diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2010-02-23 11:47:58 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-04-25 06:52:51 -0400 |
commit | c310bac5a20fc37f761bd7297ba2e52cf40d79c6 (patch) | |
tree | b5aed3e937691f8bf65857402535ece04ee47a58 | |
parent | 66b7138f913635b40822890ba8913548f8b285b8 (diff) |
KVM: x86: Drop RF manipulation for guest single-stepping
RF is not required for injecting TF as the latter will trigger only
after an instruction execution anyway. So do not touch RF when arming or
disarming guest single-step mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-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 f2f246ae4a4c..a519fc6ed051 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -5884,7 +5884,7 @@ unsigned long kvm_get_rflags(struct kvm_vcpu *vcpu) | |||
5884 | 5884 | ||
5885 | rflags = kvm_x86_ops->get_rflags(vcpu); | 5885 | rflags = kvm_x86_ops->get_rflags(vcpu); |
5886 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) | 5886 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) |
5887 | rflags &= ~(unsigned long)(X86_EFLAGS_TF | X86_EFLAGS_RF); | 5887 | rflags &= ~X86_EFLAGS_TF; |
5888 | return rflags; | 5888 | return rflags; |
5889 | } | 5889 | } |
5890 | EXPORT_SYMBOL_GPL(kvm_get_rflags); | 5890 | EXPORT_SYMBOL_GPL(kvm_get_rflags); |
@@ -5893,7 +5893,7 @@ void kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) | |||
5893 | { | 5893 | { |
5894 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP && | 5894 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP && |
5895 | kvm_is_linear_rip(vcpu, vcpu->arch.singlestep_rip)) | 5895 | kvm_is_linear_rip(vcpu, vcpu->arch.singlestep_rip)) |
5896 | rflags |= X86_EFLAGS_TF | X86_EFLAGS_RF; | 5896 | rflags |= X86_EFLAGS_TF; |
5897 | kvm_x86_ops->set_rflags(vcpu, rflags); | 5897 | kvm_x86_ops->set_rflags(vcpu, rflags); |
5898 | } | 5898 | } |
5899 | EXPORT_SYMBOL_GPL(kvm_set_rflags); | 5899 | EXPORT_SYMBOL_GPL(kvm_set_rflags); |