public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] i386: Add support for CPUID 0x80000026 and Bus Lock Detect
@ 2025-11-21  8:34 Shivansh Dhiman
  2025-11-21  8:34 ` [PATCH 1/5] i386: Implement CPUID 0x80000026 Shivansh Dhiman
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Shivansh Dhiman @ 2025-11-21  8:34 UTC (permalink / raw)
  To: pbonzini, zhao1.liu, mtosatti, kvm
  Cc: qemu-devel, seanjc, santosh.shukla, nikunj.dadhania,
	ravi.bangoria, babu.moger, shivansh.dhiman

This series introduces support for AMD's Extended CPU Topology CPUID leaf
(0x80000026) and Bus Lock Detect in QEMU. 

AMD's Extended CPU Topology presents the complete topology information to
guests via a single CPUID with multiple subleafs, each describing a specific
hierarchy level, viz. core, complex, die, socket. 

A new CPU property is added to gate this CPUID to AMD Zen 4+ CPUs. New
versions of EPYC-Genoa and EPYC-Turin are also created to include the
property. Tested the VM migrations with both newer and older CPU versions.

Bus Lock Detect signals when a process has acquired a bus lock. It is
enumerated with cpuid Fn0000_0007_ECX_x0 bit [24 / BUSLOCKTRAP]. It can be
enabled through MSR_IA32_DEBUGCTLMSR. When enabled, hardware clears DR6[11]
and raises a #DB exception on occurrence of Bus Lock if CPL > 0. More detail
about the feature can be found in AMD APM[1]. 

It is enabled for EPYC-Turin-v2. The KVM patch enabling Bus Lock Detect
for SVM can be found here:
https://lore.kernel.org/kvm/20251121081228.426974-1-shivansh.dhiman@amd.com/

Patches are prepared on master (4481234e).

[1]: AMD64 Architecture Programmer's Manual Pub. 40332, Rev. 4.07 - June
     2023, Vol 2, 13.1.3.6 Bus Lock Trap
     https://bugzilla.kernel.org/attachment.cgi?id=304653

Best regards,
Shivansh
---
Ravi Bangoria (1):
  i386: Add Bus Lock Detect support

Shivansh Dhiman (4):
  i386: Implement CPUID 0x80000026
  i386: Add CPU property x-force-cpuid-0x80000026
  i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU
  i386: Add Bus Lock Detect support for EPYC-Turin-v2 model

 target/i386/cpu.c     | 103 ++++++++++++++++++++++++++++++++++++++++++
 target/i386/cpu.h     |  19 ++++++++
 target/i386/kvm/kvm.c |  21 ++++++++-
 3 files changed, 141 insertions(+), 2 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-02-04  9:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  8:34 [PATCH 0/5] i386: Add support for CPUID 0x80000026 and Bus Lock Detect Shivansh Dhiman
2025-11-21  8:34 ` [PATCH 1/5] i386: Implement CPUID 0x80000026 Shivansh Dhiman
2026-01-07  7:25   ` Zhao Liu
2026-01-08 10:33     ` Shivansh Dhiman
2026-01-09  9:03       ` Zhao Liu
2026-01-09 11:41         ` Shivansh Dhiman
2026-01-12  8:01           ` Zhao Liu
2026-02-04  6:43             ` Shivansh Dhiman
2025-11-21  8:34 ` [PATCH 2/5] i386: Add CPU property x-force-cpuid-0x80000026 Shivansh Dhiman
2026-01-07  7:47   ` Zhao Liu
2026-01-09  9:00     ` Shivansh Dhiman
2026-01-12  7:57       ` Zhao Liu
2026-02-04  6:42         ` Shivansh Dhiman
2025-11-21  8:34 ` [PATCH 3/5] i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU Shivansh Dhiman
2026-01-07  7:47   ` Zhao Liu
2025-11-21  8:34 ` [PATCH 4/5] i386: Add Bus Lock Detect support Shivansh Dhiman
2026-02-04  9:02   ` Shivansh Dhiman
2025-11-21  8:34 ` [PATCH 5/5] i386: Add Bus Lock Detect support for EPYC-Turin-v2 model Shivansh Dhiman

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