From 376492f8ecefc93d1a067d7ad51b5f044f4dd9b3 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Thu, 18 Mar 2010 15:20:10 +0200 Subject: [PATCH] --- yaml --- r: 197683 b: refs/heads/master c: 6aebfa6ea75f9a02a0339e733090dd40d6f2edfd h: refs/heads/master i: 197681: e8be1d80618ea42760479c41b3e4a11686fd1ce8 197679: 8857869980676824cfa1ddca91ede65085ee5e19 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/emulate.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 74b858cb60e6..2742760d1a03 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab8557b2b361c8bb2e2421c791c8f6c4f6ba3d08 +refs/heads/master: 6aebfa6ea75f9a02a0339e733090dd40d6f2edfd diff --git a/trunk/arch/x86/kvm/emulate.c b/trunk/arch/x86/kvm/emulate.c index fa4604e03250..836e97ba45da 100644 --- a/trunk/arch/x86/kvm/emulate.c +++ b/trunk/arch/x86/kvm/emulate.c @@ -2520,6 +2520,13 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) 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;