projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab8557b
)
KVM: x86 emulator: inject #UD on access to non-existing CR
author
Gleb Natapov
<gleb@redhat.com>
Thu, 18 Mar 2010 13:20:10 +0000
(15:20 +0200)
committer
Avi Kivity
<avi@redhat.com>
Mon, 17 May 2010 09:16:05 +0000
(12:16 +0300)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index fa4604e0325096209dca3f7236670b67d17892bf..836e97ba45da2f9f6f509b2e8dc447c2bc687972 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-2520,6
+2520,13
@@
twobyte_insn:
c->dst.type = OP_NONE;
break;
case 0x20: /* mov cr, reg */
+ switch (c->modrm_reg) {
+ case 1:
+ case 5 ... 7:
+ case 9 ... 15:
+ kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
+ goto done;
+ }
c->regs[c->modrm_rm] = ops->get_cr(c->modrm_reg, ctxt->vcpu);
c->dst.type = OP_NONE; /* no writeback */
break;