From: Peter Xu <peterx@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Sean Christopherson <sean.j.christopherson@intel.com>,
peterx@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 1/3] KVM: X86: Set RTM for DB_VECTOR too for KVM_EXIT_DEBUG
Date: Tue, 5 May 2020 16:49:58 -0400 [thread overview]
Message-ID: <20200505205000.188252-2-peterx@redhat.com> (raw)
In-Reply-To: <20200505205000.188252-1-peterx@redhat.com>
RTM should always been set even with KVM_EXIT_DEBUG on #DB.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
arch/x86/kvm/vmx/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c2c6335a998c..05ed3e707ec6 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -4685,7 +4685,7 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
kvm_queue_exception(vcpu, DB_VECTOR);
return 1;
}
- kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1;
+ kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1 | DR6_RTM;
kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7);
/* fall through */
case BP_VECTOR:
--
2.26.2
next prev parent reply other threads:[~2020-05-05 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 20:49 [PATCH 0/3] KVM: X86: Two fixes for KVM_SET_GUEST_DEBUG, and a selftest Peter Xu
2020-05-05 20:49 ` Peter Xu [this message]
2020-05-05 20:49 ` [PATCH 2/3] KVM: X86: Fix single-step with KVM_SET_GUEST_DEBUG Peter Xu
2020-05-05 20:50 ` [PATCH 3/3] KVM: selftests: Add KVM_SET_GUEST_DEBUG test Peter Xu
2020-05-06 9:30 ` [PATCH 0/3] KVM: X86: Two fixes for KVM_SET_GUEST_DEBUG, and a selftest Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200505205000.188252-2-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).