Skip to content

Commit 33d85a9

Browse files
committed
KVM: arm64: nv: Unfudge ID_AA64PFR0_EL1 masking
Marc reports that L1 VMs aren't booting with the NV series applied to today's kvmarm/next. After bisecting the issue, it appears that 44241f3 ("KVM: arm64: nv: Use accessors for modifying ID registers") is to blame. Poking around at the issue a bit further, it'd appear that the value for ID_AA64PFR0_EL1 is complete garbage, as 'val' still contains the value we set ID_AA64ISAR1_EL1 to. Fix the read-modify-write pattern to actually use ID_AA64PFR0_EL1 as the starting point. Excuse me as I return to my shame cube. Reported-by: Marc Zyngier <[email protected]> Fixes: 44241f3 ("KVM: arm64: nv: Use accessors for modifying ID registers") Acked-by: Marc Zyngier <[email protected]> Tested-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 11a31be commit 33d85a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static void limit_nv_id_regs(struct kvm *kvm)
4040
kvm_set_vm_id_reg(kvm, SYS_ID_AA64ISAR1_EL1, val);
4141

4242
/* No AMU, MPAM, S-EL2, RAS or SVE */
43-
kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1);
43+
val = kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1);
4444
val &= ~(GENMASK_ULL(55, 52) |
4545
NV_FTR(PFR0, AMU) |
4646
NV_FTR(PFR0, MPAM) |

0 commit comments

Comments
 (0)