From: Chenyi Qiang <chenyi.qiang@intel.com>
To: Sean Christopherson <seanjc@google.com>,
Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, <kvm@vger.kernel.org>
Subject: Re: [kvm-unit-tests PATCH 2/2] nVMX: Test IA32_DEBUGCTLMSR behavior on set and cleared save/load debug controls
Date: Thu, 21 May 2026 09:57:48 +0800 [thread overview]
Message-ID: <0b9be606-dfc1-432f-8291-e1b4dcbf413e@intel.com> (raw)
In-Reply-To: <ag3U77kKME3LM6at@google.com>
On 5/20/2026 11:36 PM, Sean Christopherson wrote:
> On Mon, Aug 11, 2025, Xiaoyao Li wrote:
>> On 8/11/2025 2:30 PM, Chenyi Qiang wrote:
>>> Besides the existing DR7 test on debug controls, introduce a similar
>>> separate test for IA32_DEBUGCTLMSR.
>>>
>>> Previously, the IA32_DEBUGCTLMSR was combined with the DR7 test. However,
>>> it attempted to access the LBR and BTF bits in the MSR which can be
>>> invalid. Although KVM will exempt these two bits from validity check,
>>> they will be cleared and resulted in the unexpected MSR value.
>>
>> Initially, LBR (bit 0) and BTF(bit 1) have been allowed to write by the
>> guest but the value are dropped, as the workaround to not break some OS that
>> writes to the MSR unconditionally.
>>
>> BTF never gets supported by KVM. While LBR gained support but it depends on
>> PMU and LBR being exposed to the guest, which requires additional parameters
>> to the test configuration.
>>
>> On the other hand, DEBUGCTLMSR_BUS_LOCK_DETECT chosen by this patch doesn't
>> require additional parameter, but it requires the hardware support of the
>> feature. IIRC, it needs to be SPR and later. So it has less coverage of
>> hardwares than LBR.
>>
>> I'm not sure the preference of Sean/Paolo. Let's see what they would say.
>
> I would say add dedicated tests (for BUS_LOCK_DETECT and LBR), and get any coverage
> for KVM's handling of DEBUGCTL reads and writes as a side effect.
Thanks Sean for your comments. I will pick up this series and post a new version.
next prev parent reply other threads:[~2026-05-21 1:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 6:30 [kvm-unit-tests PATCH 0/2] nVMX: Improve IA32_DEBUGCTLMSR test on debug controls Chenyi Qiang
2025-08-11 6:30 ` [kvm-unit-tests PATCH 1/2] nVMX: Remove the IA32_DEBUGCTLMSR access in debugctls test Chenyi Qiang
2025-08-11 7:29 ` Xiaoyao Li
2025-08-11 8:12 ` Chenyi Qiang
2025-08-11 6:30 ` [kvm-unit-tests PATCH 2/2] nVMX: Test IA32_DEBUGCTLMSR behavior on set and cleared save/load debug controls Chenyi Qiang
2025-08-11 7:47 ` Xiaoyao Li
2025-08-11 9:33 ` Chenyi Qiang
2026-05-20 15:36 ` Sean Christopherson
2026-05-21 1:57 ` Chenyi Qiang [this message]
2025-08-26 8:42 ` [kvm-unit-tests PATCH 0/2] nVMX: Improve IA32_DEBUGCTLMSR test on " Chenyi Qiang
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=0b9be606-dfc1-432f-8291-e1b4dcbf413e@intel.com \
--to=chenyi.qiang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=xiaoyao.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.