diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2010-02-23 11:47:59 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-04-25 06:52:55 -0400 |
commit | 83bf0002c91b65744db78df36d4f1af27bd9099b (patch) | |
tree | 1c499c60d4c839329cf33854ffcd1212aeaed448 /arch/x86/kvm/x86.c | |
parent | c310bac5a20fc37f761bd7297ba2e52cf40d79c6 (diff) |
KVM: x86: Preserve injected TF across emulation
Call directly into the vendor services for getting/setting rflags in
emulate_instruction to ensure injected TF survives the emulation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a519fc6ed051..3a367f35cebf 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3447,7 +3447,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, | |||
3447 | kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); | 3447 | kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); |
3448 | 3448 | ||
3449 | vcpu->arch.emulate_ctxt.vcpu = vcpu; | 3449 | vcpu->arch.emulate_ctxt.vcpu = vcpu; |
3450 | vcpu->arch.emulate_ctxt.eflags = kvm_get_rflags(vcpu); | 3450 | vcpu->arch.emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu); |
3451 | vcpu->arch.emulate_ctxt.mode = | 3451 | vcpu->arch.emulate_ctxt.mode = |
3452 | (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL : | 3452 | (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL : |
3453 | (vcpu->arch.emulate_ctxt.eflags & X86_EFLAGS_VM) | 3453 | (vcpu->arch.emulate_ctxt.eflags & X86_EFLAGS_VM) |
@@ -3526,7 +3526,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, | |||
3526 | return EMULATE_DO_MMIO; | 3526 | return EMULATE_DO_MMIO; |
3527 | } | 3527 | } |
3528 | 3528 | ||
3529 | kvm_set_rflags(vcpu, vcpu->arch.emulate_ctxt.eflags); | 3529 | kvm_x86_ops->set_rflags(vcpu, vcpu->arch.emulate_ctxt.eflags); |
3530 | 3530 | ||
3531 | if (vcpu->mmio_is_write) { | 3531 | if (vcpu->mmio_is_write) { |
3532 | vcpu->mmio_needed = 0; | 3532 | vcpu->mmio_needed = 0; |