[PATCH v3 13/47] KVM: arm64: Use kernel-space partid configuration for hypercalls

Ben Horgan ben.horgan at arm.com
Tue Jan 13 06:35:16 PST 2026


Hi Jonathan,

On 1/13/26 14:21, Jonathan Cameron wrote:
> On Mon, 12 Jan 2026 16:58:40 +0000
> Ben Horgan <ben.horgan at arm.com> wrote:
> 
>> On nVHE systems whether or not MPAM is enabled, EL2 continues to use
>> partid-0 for hypercalls, even when the host may have configured its kernel
>> threads to use a different partid. 0 may have been assigned to another
>> task. Copy the EL1 MPAM register to EL2. This ensures hypercalls use the
>> same partid as the kernel thread does on the host.
>>
>> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
>> ---
>> Changes since v2:
>> Use mask
>> Use read_sysreg_el1 to cope with hvhe
> 
> nvhe

In this case, I do mean arm64_sw.hvhe which is the configuration when
kvm-arm.mode=protected. The aliasing of the registers when E2H is set
meant that the read_sysreg_s(SYS_MPAM1_EL1) was actually accessing
SYS_MPAM2_EL2 and so the read and write were for the same value.

Thanks,

Ben




More information about the linux-arm-kernel mailing list