[Devel] [PATCH RHEL7 COMMIT] ms/KVM: x86: Do not clear RFLAGS.TF when a singlestep trap occurs.

Konstantin Khorenko khorenko at virtuozzo.com
Mon Apr 1 15:41:53 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.7
------>
commit 26a4091a673adf843b6597412856f54189a1993e
Author: Kyle Huey <me at kylehuey.com>
Date:   Mon Apr 1 15:41:51 2019 +0300

    ms/KVM: x86: Do not clear RFLAGS.TF when a singlestep trap occurs.
    
    The trap flag stays set until software clears it.
    
    Signed-off-by: Kyle Huey <khuey at kylehuey.com>
    Signed-off-by: Radim Krčmář <rkrcmar at redhat.com>
    
    https://jira.sw.ru/browse/PSBM-92865
    (cherry picked from commit ea07e42dec5644105db8a853575a0a271f93d294)
    Signed-off-by: Jan Dakinevich <jan.dakinevich at virtuozzo.com>
    
    =====================
    Patchset description:
    
    KVM: fix 'debug' test from 'kvm-unit-tests'
    
    Reviewed-by: Roman Kagan <rkagan at virtuozzo.com>
---
 arch/x86/kvm/x86.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1ecf99b1ed0a..c075dfe5c015 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5515,7 +5515,6 @@ static void kvm_vcpu_do_singlestep(struct kvm_vcpu *vcpu, int *r)
 		kvm_run->exit_reason = KVM_EXIT_DEBUG;
 		*r = EMULATE_USER_EXIT;
 	} else {
-		vcpu->arch.emulate_ctxt.eflags &= ~X86_EFLAGS_TF;
 		/*
 		 * "Certain debug exceptions may clear bit 0-3.  The
 		 * remaining contents of the DR6 register are never



More information about the Devel mailing list