KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs
authorOliver Upton <oliver.upton@linux.dev>
Thu, 29 Aug 2024 00:46:22 +0000 (00:46 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 29 Aug 2024 07:34:03 +0000 (08:34 +0100)
commit4641c7ea88d1029500ff64c4d0a1df0584b1bfcc
tree7aa9dc468d987cbb5e070a27f8d911a073abadeb
parentde2e75209303b98d3169a249a1bc847be9657d9b
KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs

Broonie reports that the set_id_regs test is failing as of commit
5cb57a1aff75 ("KVM: arm64: Zero ID_AA64PFR0_EL1.GIC when no GICv3 is
presented to the guest"). The test does not anticipate the 'late' ID
register fixup where KVM clobbers the GIC field in absence of GICv3.

While the field technically has FTR_LOWER_SAFE behavior, fix the issue
by setting it to an exact value of 0, matching the effect of the 'late'
fixup.

Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240829004622.3058639-1-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
tools/testing/selftests/kvm/aarch64/set_id_regs.c