]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/cpufeatures: Add CPUID feature bit for the Bus Lock Threshold
authorManali Shukla <manali.shukla@amd.com>
Fri, 2 May 2025 05:03:43 +0000 (05:03 +0000)
committerSean Christopherson <seanjc@google.com>
Fri, 16 May 2025 16:40:23 +0000 (09:40 -0700)
commitfaad6645e1128ec2187d56009e2b76d603772d5f
tree261f552b873e6bf30838461dbaa71ae0d1116c63
parente9628b011bbd7f9cc13fb9c15267695c996338c7
x86/cpufeatures: Add CPUID feature bit for the Bus Lock Threshold

Misbehaving guests can cause bus locks to degrade the performance of
the system. The Bus Lock Threshold feature can be used to address this
issue by providing capability to the hypervisor to limit guest's
ability to generate bus lock, thereby preventing system slowdown due
to performance penalities.

When the Bus Lock Threshold feature is enabled, the processor checks
the bus lock threshold count before executing the buslock and decides
whether to trigger bus lock exit or not.

The value of the bus lock threshold count '0' generates bus lock
exits, and if the value is greater than '0', the bus lock is executed
successfully and the bus lock threshold count is decremented.

Presence of the Bus Lock threshold feature is indicated via CPUID
function 0x8000000A_EDX[29].

Signed-off-by: Manali Shukla <manali.shukla@amd.com>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20250502050346.14274-3-manali.shukla@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/cpufeatures.h