Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v2 0/4] nVMX: Improve IA32_DEBUGCTLMSR test on debug controls
@ 2026-05-26  3:16 Chenyi Qiang
  2026-05-26  3:16 ` [kvm-unit-tests PATCH v2 1/4] nVMX: Remove the IA32_DEBUGCTLMSR access in debugctls test Chenyi Qiang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Chenyi Qiang @ 2026-05-26  3:16 UTC (permalink / raw)
  To: kvm; +Cc: Chenyi Qiang, Paolo Bonzini, Sean Christopherson, Xiaoyao Li

Current nested debugctls test focuses on DR7 value and fakes the result of
IA32_DEBUGCTLMSR in comment. Although the test can pass because DR7 is the
only criterion to determine the result, there are some error messages
appearing in dmesg due to accessing to BTF | LBR bits in IA32_DEBUGCTLMSR
with report_ignored_msrs KVM parameter enabled.

Clean up the old test so that it focuses on DR7, then add separate tests for
DEBUGCTLMSR bits that are actually supported and can be validated during VMX
transitions.

Tested on:
  Emerald Rapids:
    vmx_bus_lock_detect_test  PASS
    vmx_rtm_test              PASS
    vmx_legacy_lbr_test       SKIP

  Skylake:
    vmx_bus_lock_detect_test  SKIP
    vmx_rtm_test              PASS
    vmx_legacy_lbr_test       PASS

Changes since v1:
- Modify the commit message in patch 1 (Xiaoyao)
- Add dedicated tests (for BUS_LOCK_DETECT and LBR) covering the DEBUGCTL
  reads and writes during VMX transitions (Sean)
- Add one additional test for RTM_DEBUG bit that was not mentioned in v1.
- https://lore.kernel.org/kvm/20250811063035.12626-1-chenyi.qiang@intel.com/

Chenyi Qiang (4):
  nVMX: Remove the IA32_DEBUGCTLMSR access in debugctls test
  nVMX: Validate DEBUGCTLMSR_BUS_LOCK_DETECT states during VMX
    transitions
  nVMX: Validate DEBUGCTLMSR_RTM_DEBUG states during VMX transitions
  nVMX: Validate DEBUGCTLMSR_LBR states during VMX transitions

 lib/x86/msr.h     |   2 +
 x86/unittests.cfg |  25 +++++++
 x86/vmx_tests.c   | 175 +++++++++++++++++++++++++++++++++++++---------
 3 files changed, 170 insertions(+), 32 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-05-27 15:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  3:16 [kvm-unit-tests PATCH v2 0/4] nVMX: Improve IA32_DEBUGCTLMSR test on debug controls Chenyi Qiang
2026-05-26  3:16 ` [kvm-unit-tests PATCH v2 1/4] nVMX: Remove the IA32_DEBUGCTLMSR access in debugctls test Chenyi Qiang
2026-05-26  4:39   ` Xiaoyao Li
2026-05-26  4:52     ` Chenyi Qiang
2026-05-26  3:16 ` [kvm-unit-tests PATCH v2 2/4] nVMX: Validate DEBUGCTLMSR_BUS_LOCK_DETECT states during VMX transitions Chenyi Qiang
2026-05-26 12:32   ` Xiaoyao Li
2026-05-27  1:42     ` Chenyi Qiang
2026-05-27 14:58       ` Sean Christopherson
2026-05-27 15:16         ` Xiaoyao Li
2026-05-27 15:20           ` Sean Christopherson
2026-05-26  3:16 ` [kvm-unit-tests PATCH v2 3/4] nVMX: Validate DEBUGCTLMSR_RTM_DEBUG " Chenyi Qiang
2026-05-26 12:33   ` Xiaoyao Li
2026-05-26  3:16 ` [kvm-unit-tests PATCH v2 4/4] nVMX: Validate DEBUGCTLMSR_LBR " Chenyi Qiang
2026-05-26 12:34   ` Xiaoyao Li
2026-05-27  2:11     ` Chenyi Qiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox