Re: [PATCH v1 10/26] KVM: arm64: Fix set_oslsr_el1 to write to OSLAR_EL1
From: Andreas Grapentin
Date: Tue Jun 02 2026 - 05:42:54 EST
On Jun 01 26, Oliver Upton wrote:
> The current behavior of KVM is correct. KVM treats OSLSR_EL1 as the
> stateful representation of the OS lock and is RO from the guest POV.
>
> We keep the UAPI straightforward by making this register RW from
> userspace, such that the VMM can directly write back the value returned
> from KVM_GET_ONE_REG.
>
> Do you have another reason for using OSLAR_EL1 as the canonical
> representation?
Ah, thanks for pointing that out!
this change must have bled into the shared KVM code by mistake, it was
supposed to live in the s390 specific code because it deals with an s390
specific quirk. It was not intended for this change to have any impact
on the native arm64 KVM implementation.
on s390, we need to map the userspace writes of OSLSR_EL1 to OSLAR_EL1,
because OSLSR_EL1 is write-only for the facilities that are available to
us to write system registers. But that detail should be confined to an
s390-specific implementation of set_oslsr_el1.
We'll amend this for v2.
Best,
Andreas