From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Hou Wenlong <houwenlong.hwl@antgroup.com>,
Lai Jiangshan <jiangshan.ljs@antgroup.com>
Subject: Re: [PATCH v3 09/10] KVM: selftests: Verify guest debug DR7.GD checking during instruction emulation
Date: Wed, 20 May 2026 09:13:19 -0700 [thread overview]
Message-ID: <ag3dny0O2WOnYonZ@google.com> (raw)
In-Reply-To: <20260515222638.1949982-10-seanjc@google.com>
On Fri, May 15, 2026, Sean Christopherson wrote:
> @@ -202,6 +207,22 @@ int main(void)
> run->debug.arch.pc, target_rip, run->debug.arch.dr6,
> target_dr6);
>
> + /* test global disable in emulation */
> + if (is_forced_emulation_enabled) {
> + /* Skip the 3-bytes "mov dr0" */
> + vcpu_skip_insn(vcpu, 3);
> + vcpu_run(vcpu);
> + TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG &&
> + run->debug.arch.exception == DB_VECTOR &&
> + run->debug.arch.pc == CAST_TO_RIP(fep_bd_start) &&
> + run->debug.arch.dr6 == target_dr6,
> + "DR7.GD: exit %d exception %d rip 0x%llx "
> + "(should be 0x%llx) dr6 0x%llx (should be 0x%llx)",
> + run->exit_reason, run->debug.arch.exception,
> + run->debug.arch.pc, target_rip, run->debug.arch.dr6,
Per Sashiko[*], this should print CAST_TO_RIP(fep_bd_start), not target_rip. I'll
fixup when applying.
[*] https://sashiko.dev/#/patchset/20260515222638.1949982-1-seanjc%40google.com
> + target_dr6);
> + }
> +
> /* Disable all debug controls, run to the end */
> memset(&debug, 0, sizeof(debug));
> vcpu_guest_debug_set(vcpu, &debug);
> --
> 2.54.0.563.g4f69b47b94-goog
>
next prev parent reply other threads:[~2026-05-20 16:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 22:26 [PATCH v3 00/10] KVM: x86: Improve #DB handling in the emulator Sean Christopherson
2026-05-15 22:26 ` [PATCH v3 01/10] KVM: VMX: Refresh GUEST_PENDING_DBG_EXCEPTIONS.BS on all injected #DBs Sean Christopherson
2026-05-18 8:17 ` Hou Wenlong
2026-05-20 16:11 ` Sean Christopherson
2026-05-21 12:33 ` Hou Wenlong
2026-05-15 22:26 ` [PATCH v3 02/10] KVM: x86: Capture "struct x86_exception" in inject_emulated_exception() Sean Christopherson
2026-05-18 18:01 ` Yosry Ahmed
2026-05-15 22:26 ` [PATCH v3 03/10] KVM: x86: Set guest DR6 by kvm_queue_exception_p() in instruction emulation Sean Christopherson
2026-05-18 18:13 ` Yosry Ahmed
2026-05-15 22:26 ` [PATCH v3 04/10] KVM: x86: Honor KVM_GUESTDBG_USE_HW_BP when emulating MOV DR (in emulator) Sean Christopherson
2026-05-18 18:17 ` Yosry Ahmed
2026-05-15 22:26 ` [PATCH v3 05/10] KVM: x86: Honor KVM_GUESTDBG_USE_HW_BP when checking for code breakpoints in emulation Sean Christopherson
2026-05-15 22:26 ` [PATCH v3 06/10] KVM: x86: Move KVM_GUESTDBG_SINGLESTEP handling into kvm_inject_emulated_db() Sean Christopherson
2026-05-18 18:22 ` Yosry Ahmed
2026-05-15 22:26 ` [PATCH v3 07/10] KVM: x86: Drop kvm_vcpu_do_singlestep() now that it's been gutted Sean Christopherson
2026-05-18 18:22 ` Yosry Ahmed
2026-05-15 22:26 ` [PATCH v3 08/10] KVM: selftests: Add all (known) EFLAGS bit definitions Sean Christopherson
2026-05-15 22:26 ` [PATCH v3 09/10] KVM: selftests: Verify guest debug DR7.GD checking during instruction emulation Sean Christopherson
2026-05-20 16:13 ` Sean Christopherson [this message]
2026-05-15 22:26 ` [PATCH v3 10/10] KVM: selftests: Verify VMX's GUEST_PENDING_DBG_EXCEPTIONS.BS Consistency Check Sean Christopherson
2026-05-20 16:19 ` Sean Christopherson
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=ag3dny0O2WOnYonZ@google.com \
--to=seanjc@google.com \
--cc=houwenlong.hwl@antgroup.com \
--cc=jiangshan.ljs@antgroup.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@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