From ea07e42dec5644105db8a853575a0a271f93d294 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Tue, 29 Nov 2016 12:40:41 -0800 Subject: [PATCH] KVM: x86: Do not clear RFLAGS.TF when a singlestep trap occurs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The trap flag stays set until software clears it. Signed-off-by: Kyle Huey Signed-off-by: Radim Krčmář --- 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 7b38c5e..dd6b41e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5419,7 +5419,6 @@ static void kvm_vcpu_check_singlestep(struct kvm_vcpu *vcpu, unsigned long rflag 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 -- 2.7.4