]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely ignored
authorJames Morse <james.morse@arm.com>
Wed, 30 Oct 2024 16:03:17 +0000 (16:03 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 31 Oct 2024 18:10:52 +0000 (18:10 +0000)
commit75cd027cbcb161e277209e20df14f0818c62d9e7
tree0417ebbe9d31df706fd1b794f9e49051fa447518
parent6685f5d572c22e1003e7c0d089afe1c64340ab1f
KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely ignored

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@arm.com>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241030160317.2528209-8-joey.gouly@arm.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
tools/testing/selftests/kvm/aarch64/set_id_regs.c