Skip to contentSkip to conversation

KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs

PATCH Applied Oliver Upton 3 participants 4 messages Aug 29, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tools/testing/selftests/kvm/aarch64/set_id_regs.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/kvm/aarch64/set_id_regs.c +1 -0
index d20981663831..2a3fe7914b72 100644
@@ -126,6 +126,7 @@ static const struct reg_ftr_bits ftr_id_aa64pfr0_el1[] = {
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, CSV2, 0),
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, DIT, 0),
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, SEL2, 0),
+	REG_FTR_BITS(FTR_EXACT, ID_AA64PFR0_EL1, GIC, 0),
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, EL3, 0),
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, EL2, 0),
 	REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64PFR0_EL1, EL1, 0),
Signature · 1 line
2.46.0.295.g3b9ea8a38a-goog
maintainer Applied
#1 lore raw
Quoted 10 lines · Oliver Upton

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.

[...]

Applied to next, thanks!

[1/1] KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs

      commit: 4641c7ea88d1029500ff64c4d0a1df0584b1bfcc

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Tested-by on v1 1/1
#2 lore raw
In reply to Oliver Upton
Quoted 4 lines · Oliver Upton

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.

A bit late but JFTR:

#3 lore raw
Quoted 9 lines · Mark Brown
Quoted 4 lines · Oliver Upton

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.

A bit late but JFTR:

Great, thanks for the report + confirming the fix!

Signature · 2 lines
Thanks,
Oliver