diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-03-18 09:20:06 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:15:59 -0400 |
commit | 063db061b9b3472c925f09ae3a0a8359b80c2295 (patch) | |
tree | b38642f43f436c88ab67c5cadd618596d6e9130a /arch/x86/kvm/x86.c | |
parent | 9c5372445c1ad4fcdb4128957ec89334223b8113 (diff) |
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.c | 1 |
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, | |||
3531 | 3531 | ||
3532 | vcpu->arch.emulate_ctxt.vcpu = vcpu; | 3532 | vcpu->arch.emulate_ctxt.vcpu = vcpu; |
3533 | vcpu->arch.emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu); | 3533 | vcpu->arch.emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu); |
3534 | vcpu->arch.emulate_ctxt.eip = kvm_rip_read(vcpu); | ||
3534 | vcpu->arch.emulate_ctxt.mode = | 3535 | vcpu->arch.emulate_ctxt.mode = |
3535 | (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL : | 3536 | (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL : |
3536 | (vcpu->arch.emulate_ctxt.eflags & X86_EFLAGS_VM) | 3537 | (vcpu->arch.emulate_ctxt.eflags & X86_EFLAGS_VM) |