aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-19 13:53:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-19 13:53:21 -0700
commit88d53766bd0f3bc6e46a0dff25be147a2b98c511 (patch)
treedc0500d2685029f47629cffee766cc0b2cc3562a /arch/x86/kvm/x86_emulate.c
parent860da5e578c25d1ab4528c0d1ad13f9969e3490f (diff)
parent54aaacee35afd594bba3244c20b02cc98d80a961 (diff)
Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: KVM: LAPIC: ignore pending timers if LVTT is disabled KVM: Update MAINTAINERS for new mailing lists KVM: Fix kvm_vcpu_block() task state race KVM: ia64: Set KVM_IOAPIC_NUM_PINS to 48 KVM: ia64: fix GVMM module including position-dependent objects KVM: ia64: Define new kvm_fpreg struture to replace ia64_fpreg KVM: PIT: take inject_pending into account when emulating hlt s390: KVM guest: fix compile error KVM: x86 emulator: fix writes to registers with modrm encodings
Diffstat (limited to 'arch/x86/kvm/x86_emulate.c')
-rw-r--r--arch/x86/kvm/x86_emulate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index f2a696d6a24..8a96320ab07 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -677,8 +677,9 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt,
c->use_modrm_ea = 1;
if (c->modrm_mod == 3) {
- c->modrm_val = *(unsigned long *)
- decode_register(c->modrm_rm, c->regs, c->d & ByteOp);
+ c->modrm_ptr = decode_register(c->modrm_rm,
+ c->regs, c->d & ByteOp);
+ c->modrm_val = *(unsigned long *)c->modrm_ptr;
return rc;
}
@@ -1005,6 +1006,7 @@ done_prefixes:
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->src.type = OP_REG;
c->src.val = c->modrm_val;
+ c->src.ptr = c->modrm_ptr;
break;
}
c->src.type = OP_MEM;
@@ -1049,6 +1051,7 @@ done_prefixes:
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->dst.type = OP_REG;
c->dst.val = c->dst.orig_val = c->modrm_val;
+ c->dst.ptr = c->modrm_ptr;
break;
}
c->dst.type = OP_MEM;