[PATCH 0/2] x86/svm: Add support for Bus Lock Threshold

Alejandro Vallejo posted 2 patches 5 days, 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260120095353.2778-1-alejandro.garciavallejo@amd.com
There is a newer version of this series
xen/arch/x86/hvm/svm/svm.c            |  5 +++++
xen/arch/x86/hvm/svm/vmcb.c           |  6 ++++++
xen/arch/x86/hvm/svm/vmcb.h           | 15 +++++++++++++--
xen/arch/x86/include/asm/hvm/svm.h    |  2 ++
xen/arch/x86/include/asm/perfc_defn.h |  2 +-
5 files changed, 27 insertions(+), 3 deletions(-)
[PATCH 0/2] x86/svm: Add support for Bus Lock Threshold
Posted by Alejandro Vallejo 5 days, 19 hours ago
Bus Locks are very costly and a VM left unchecked spamming instructions that
lock the memory bus (e.g: unaligned atomic CAS) makes system perf take a
nosedive. This patch is similar to BLD of VMX, but for SVM. It configures all
VMRUNs so they automatically exit at the first encounter of a buslock event,
effectively rate-limiting them.

Cheers,
Alejandro

Alejandro Vallejo (2):
  x86/svm: Add infrastructure for Bus Lock Threshold
  x86/svm: Intercept Bus Locks for HVM guests

 xen/arch/x86/hvm/svm/svm.c            |  5 +++++
 xen/arch/x86/hvm/svm/vmcb.c           |  6 ++++++
 xen/arch/x86/hvm/svm/vmcb.h           | 15 +++++++++++++--
 xen/arch/x86/include/asm/hvm/svm.h    |  2 ++
 xen/arch/x86/include/asm/perfc_defn.h |  2 +-
 5 files changed, 27 insertions(+), 3 deletions(-)


base-commit: 7b3e1b4e848d34c9a5b6634009959a7b9dd42104
-- 
2.43.0
Re: [PATCH 0/2] x86/svm: Add support for Bus Lock Threshold
Posted by Alejandro Vallejo 5 days, 18 hours ago
On Tue Jan 20, 2026 at 10:53 AM CET, Alejandro Vallejo wrote:
> Bus Locks are very costly and a VM left unchecked spamming instructions that
> lock the memory bus (e.g: unaligned atomic CAS) makes system perf take a
> nosedive. This patch is similar to BLD of VMX, but for SVM. It configures all
> VMRUNs so they automatically exit at the first encounter of a buslock event,
> effectively rate-limiting them.

Does this warrant an entry in the CHANGELOG?

Cheers,
Alejandro

>
> Cheers,
> Alejandro
>
> Alejandro Vallejo (2):
>   x86/svm: Add infrastructure for Bus Lock Threshold
>   x86/svm: Intercept Bus Locks for HVM guests
>
>  xen/arch/x86/hvm/svm/svm.c            |  5 +++++
>  xen/arch/x86/hvm/svm/vmcb.c           |  6 ++++++
>  xen/arch/x86/hvm/svm/vmcb.h           | 15 +++++++++++++--
>  xen/arch/x86/include/asm/hvm/svm.h    |  2 ++
>  xen/arch/x86/include/asm/perfc_defn.h |  2 +-
>  5 files changed, 27 insertions(+), 3 deletions(-)
>
>
> base-commit: 7b3e1b4e848d34c9a5b6634009959a7b9dd42104
Re: [PATCH 0/2] x86/svm: Add support for Bus Lock Threshold
Posted by Andrew Cooper 5 days, 16 hours ago
On 20/01/2026 11:22 am, Alejandro Vallejo wrote:
> On Tue Jan 20, 2026 at 10:53 AM CET, Alejandro Vallejo wrote:
>> Bus Locks are very costly and a VM left unchecked spamming instructions that
>> lock the memory bus (e.g: unaligned atomic CAS) makes system perf take a
>> nosedive. This patch is similar to BLD of VMX, but for SVM. It configures all
>> VMRUNs so they automatically exit at the first encounter of a buslock event,
>> effectively rate-limiting them.
> Does this warrant an entry in the CHANGELOG?

The Intel side got one (back in 4.18 and in the section about Sapphire
Rapids).

~Andrew