summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov2010-03-18 14:20:06 +0100
committerAvi Kivity2010-05-17 11:15:59 +0200
commit063db061b9b3472c925f09ae3a0a8359b80c2295 (patch)
treeb38642f43f436c88ab67c5cadd618596d6e9130a /arch/x86/kvm/x86.c
parentKVM: Provide x86_emulate_ctxt callback to get current cpl (diff)
downloadkernel-qcow2-linux-063db061b9b3472c925f09ae3a0a8359b80c2295.tar.gz
kernel-qcow2-linux-063db061b9b3472c925f09ae3a0a8359b80c2295.tar.xz
kernel-qcow2-linux-063db061b9b3472c925f09ae3a0a8359b80c2295.zip
KVM: Provide current eip as part of emulator context.
Eliminate the need to call back into KVM to get it from emulator. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9cb28a943c9a..0ecd37ac9d39 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3531,6 +3531,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
vcpu->arch.emulate_ctxt.vcpu = vcpu;
vcpu->arch.emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu);
+ vcpu->arch.emulate_ctxt.eip = kvm_rip_read(vcpu);
vcpu->arch.emulate_ctxt.mode =
(!is_protmode(vcpu)) ? X86EMUL_MODE_REAL :
(vcpu->arch.emulate_ctxt.eflags & X86_EFLAGS_VM)