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>
This commit is contained in:
parent
66b7138f91
commit
c310bac5a2
1 changed files with 2 additions and 2 deletions
|
@ -5884,7 +5884,7 @@ unsigned long kvm_get_rflags(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
rflags = kvm_x86_ops->get_rflags(vcpu);
|
rflags = kvm_x86_ops->get_rflags(vcpu);
|
||||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)
|
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)
|
||||||
rflags &= ~(unsigned long)(X86_EFLAGS_TF | X86_EFLAGS_RF);
|
rflags &= ~X86_EFLAGS_TF;
|
||||||
return rflags;
|
return rflags;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(kvm_get_rflags);
|
EXPORT_SYMBOL_GPL(kvm_get_rflags);
|
||||||
|
@ -5893,7 +5893,7 @@ void kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
|
||||||
{
|
{
|
||||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP &&
|
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP &&
|
||||||
kvm_is_linear_rip(vcpu, vcpu->arch.singlestep_rip))
|
kvm_is_linear_rip(vcpu, vcpu->arch.singlestep_rip))
|
||||||
rflags |= X86_EFLAGS_TF | X86_EFLAGS_RF;
|
rflags |= X86_EFLAGS_TF;
|
||||||
kvm_x86_ops->set_rflags(vcpu, rflags);
|
kvm_x86_ops->set_rflags(vcpu, rflags);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(kvm_set_rflags);
|
EXPORT_SYMBOL_GPL(kvm_set_rflags);
|
||||||
|
|
Loading…
Add table
Reference in a new issue