[PATCH v6 7/7] KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely ignored

Gavin Shan gshan at redhat.com
Wed Oct 30 20:13:53 PDT 2024


On 10/31/24 2:03 AM, Joey Gouly wrote:
> From: James Morse <james.morse at arm.com>
> 
> The ID_AA64PFR0.MPAM bit was previously accidentally exposed to guests,
> and is ignored by KVM. KVM will always present the guest with 0 here,
> and trap the MPAM system registers to inject an undef.
> 
> But, this value is still needed to prevent migration when the value
> is incompatible with the target hardware. Add a kvm unit test to try
> and write multiple values to ID_AA64PFR0.MPAM. Only the hardware value
> previously exposed should be ignored, all other values should be
> rejected.
> 
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Joey Gouly <joey.gouly at arm.com>
> Tested-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>
> ---
>   .../selftests/kvm/aarch64/set_id_regs.c       | 99 ++++++++++++++++++-
>   1 file changed, 98 insertions(+), 1 deletion(-)
> 

Reviewed-by: Gavin Shan <gshan at redhat.com>




More information about the linux-arm-kernel mailing list