Skip to content

Commit e891432

Browse files
author
Marc Zyngier
committed
KVM: arm64: nv: Advertise the lack of AArch32 EL0 support
Although we never supported 32bit anywhere in NV, we fail to advertise so for EL0, probably owing to the relative lack of hardware supporting both NV2 and 32bit EL0. Add some sanitising to ID_AA64PFR0_EL1.EL0, and reaffirm that "in 64bit-only we trust". Reported-by: Oliver Upton <[email protected]> Acked-by: Oliver Upton <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
1 parent 78d4f34 commit e891432

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm64/kvm/nested.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,10 @@ static void limit_nv_id_regs(struct kvm *kvm)
830830
NV_FTR(PFR0, RAS) |
831831
NV_FTR(PFR0, EL3) |
832832
NV_FTR(PFR0, EL2) |
833-
NV_FTR(PFR0, EL1));
834-
/* 64bit EL1/EL2/EL3 only */
833+
NV_FTR(PFR0, EL1) |
834+
NV_FTR(PFR0, EL0));
835+
/* 64bit only at any EL */
836+
val |= FIELD_PREP(NV_FTR(PFR0, EL0), 0b0001);
835837
val |= FIELD_PREP(NV_FTR(PFR0, EL1), 0b0001);
836838
val |= FIELD_PREP(NV_FTR(PFR0, EL2), 0b0001);
837839
val |= FIELD_PREP(NV_FTR(PFR0, EL3), 0b0001);

0 commit comments

Comments
 (0)