Re: [PATCH v8 38/43] arm64: RME: Configure max SVE vector length for a Realm

From: Gavin Shan
Date: Wed Apr 30 2025 - 23:50:56 EST


On 4/16/25 11:42 PM, Steven Price wrote:
From: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>

Obtain the max vector length configured by userspace on the vCPUs, and
write it into the Realm parameters. By default the vCPU is configured
with the max vector length reported by RMM, and userspace can reduce it
with a write to KVM_REG_ARM64_SVE_VLS.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
Signed-off-by: Steven Price <steven.price@xxxxxxx>
---
Changes since v6:
* Rename max_vl/realm_max_vl to vl/last_vl - there is nothing "maximum"
about them, we're just checking that all realms have the same vector
length
---
arch/arm64/kvm/guest.c | 3 ++-
arch/arm64/kvm/rme.c | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>