Commit 72df72e1 authored by Nikunj A Dadhania's avatar Nikunj A Dadhania Committed by Sean Christopherson
Browse files

KVM: selftests: Add test to verify KVM_CAP_X86_BUS_LOCK_EXIT



Add a test case to verify x86's bus lock exit functionality, which is now
supported on both Intel and AMD.  Trigger bus lock exits by performing a
split-lock access, i.e. an atomic access that splits two cache lines.

Verify that the correct number of bus lock exits are generated, and that
the counter is incremented correctly and at the appropriate time based on
the underlying architecture.

Generate bus locks in both L1 and L2 (if nested virtualization is enabled),
as SVM's functionality in particular requires non-trivial logic to do the
right thing when running nested VMs.

Signed-off-by: default avatarNikunj A Dadhania <nikunj@amd.com>
Co-developed-by: default avatarManali Shukla <manali.shukla@amd.com>
Signed-off-by: default avatarManali Shukla <manali.shukla@amd.com>
Link: https://lore.kernel.org/r/20250502050346.14274-6-manali.shukla@amd.com


Co-developed-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 89f9edf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment