kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] x86/cpu: Add Bus Lock Detect support for AMD
@ 2024-04-29  6:06 Ravi Bangoria
  2024-04-29  6:06 ` [PATCH 1/3] x86/split_lock: Move Split and Bus lock code to a dedicated file Ravi Bangoria
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Ravi Bangoria @ 2024-04-29  6:06 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, seanjc, pbonzini, thomas.lendacky
  Cc: ravi.bangoria, hpa, rmk+kernel, peterz, james.morse,
	lukas.bulwahn, arjan, j.granados, sibs, nik.borisov, michael.roth,
	nikunj.dadhania, babu.moger, x86, kvm, linux-kernel,
	santosh.shukla, ananth.narayan, sandipan.das

Upcoming AMD uarch will support Bus Lock Detect (called Bus Lock Trap
in AMD docs). Add support for the same in Linux. Bus Lock Detect is
enumerated with cpuid 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].

Patches are prepared on tip/x86/cpu (e063b531d4e8)

Patch #3 depends on SEV-ES LBRV fix:
https://lore.kernel.org/r/20240416050338.517-1-ravi.bangoria@amd.com

[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

Ravi Bangoria (3):
  x86/split_lock: Move Split and Bus lock code to a dedicated file
  x86/bus_lock: Add support for AMD
  KVM SVM: Add Bus Lock Detect support

 arch/x86/include/asm/cpu.h           |   4 +
 arch/x86/kernel/cpu/Makefile         |   1 +
 arch/x86/kernel/cpu/amd.c            |   2 +
 arch/x86/kernel/cpu/intel.c          | 407 ---------------------------
 arch/x86/kernel/cpu/split-bus-lock.c | 406 ++++++++++++++++++++++++++
 arch/x86/kvm/svm/nested.c            |   3 +-
 arch/x86/kvm/svm/svm.c               |  16 +-
 7 files changed, 430 insertions(+), 409 deletions(-)
 create mode 100644 arch/x86/kernel/cpu/split-bus-lock.c

-- 
2.44.0


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

end of thread, other threads:[~2024-07-11  8:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29  6:06 [PATCH 0/3] x86/cpu: Add Bus Lock Detect support for AMD Ravi Bangoria
2024-04-29  6:06 ` [PATCH 1/3] x86/split_lock: Move Split and Bus lock code to a dedicated file Ravi Bangoria
2024-05-06 12:58   ` Borislav Petkov
2024-05-07  4:07     ` Ravi Bangoria
2024-04-29  6:06 ` [PATCH 2/3] x86/bus_lock: Add support for AMD Ravi Bangoria
2024-05-06 16:05   ` Tom Lendacky
2024-05-07  4:08     ` Ravi Bangoria
2024-05-06 16:24   ` Jim Mattson
2024-05-07  3:57     ` Ravi Bangoria
2024-04-29  6:06 ` [PATCH 3/3] KVM SVM: Add Bus Lock Detect support Ravi Bangoria
2024-06-04  0:45   ` Sean Christopherson
2024-06-05 11:38     ` Ravi Bangoria
2024-06-05 15:08       ` Sean Christopherson
2024-06-05 16:14         ` Ravi Bangoria
2024-06-12  1:42           ` Sean Christopherson
2024-07-10  2:25             ` Ravi Bangoria
2024-07-10  4:15               ` Jim Mattson
2024-07-10 13:52                 ` Sean Christopherson
2024-07-11  8:51                   ` Ravi Bangoria

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).