KVM: x86 emulator: fix 0f 01 /5 emulation
authorGleb Natapov <gleb@redhat.com>
Thu, 18 Mar 2010 13:20:08 +0000 (15:20 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:16:02 +0000 (12:16 +0300)
It is undefined and should generate #UD.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c

index c3b9334..7c7debb 100644 (file)
@@ -2490,6 +2490,9 @@ twobyte_insn:
                                    (c->src.val & 0x0f), ctxt->vcpu);
                        c->dst.type = OP_NONE;
                        break;
+               case 5: /* not defined */
+                       kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
+                       goto done;
                case 7: /* invlpg*/
                        emulate_invlpg(ctxt->vcpu, memop);
                        /* Disable writeback. */