Skip to content

Commit d4a89e5

Browse files
broonieMarc Zyngier
authored andcommitted
KVM: arm64: Expose S1PIE to guests
Prior to commit 70ed723 ("KVM: arm64: Sanitise ID_AA64MMFR3_EL1") we just exposed the santised view of ID_AA64MMFR3_EL1 to guests, meaning that they saw both TCRX and S1PIE if present on the host machine. That commit added VMM control over the contents of the register and exposed S1POE but removed S1PIE, meaning that the extension is no longer visible to guests. Reenable support for S1PIE with VMM control. Fixes: 70ed723 ("KVM: arm64: Sanitise ID_AA64MMFR3_EL1") Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Joey Gouly <joey.gouly@arm.com> Link: https://lore.kernel.org/r/20241005-kvm-arm64-fix-s1pie-v1-1-5901f02de749@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 79cc6cd commit d4a89e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,8 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
15581558
val &= ~ID_AA64MMFR2_EL1_CCIDX_MASK;
15591559
break;
15601560
case SYS_ID_AA64MMFR3_EL1:
1561-
val &= ID_AA64MMFR3_EL1_TCRX | ID_AA64MMFR3_EL1_S1POE;
1561+
val &= ID_AA64MMFR3_EL1_TCRX | ID_AA64MMFR3_EL1_S1POE |
1562+
ID_AA64MMFR3_EL1_S1PIE;
15621563
break;
15631564
case SYS_ID_MMFR4_EL1:
15641565
val &= ~ARM64_FEATURE_MASK(ID_MMFR4_EL1_CCIDX);
@@ -2467,6 +2468,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
24672468
ID_AA64MMFR2_EL1_NV |
24682469
ID_AA64MMFR2_EL1_CCIDX)),
24692470
ID_WRITABLE(ID_AA64MMFR3_EL1, (ID_AA64MMFR3_EL1_TCRX |
2471+
ID_AA64MMFR3_EL1_S1PIE |
24702472
ID_AA64MMFR3_EL1_S1POE)),
24712473
ID_SANITISED(ID_AA64MMFR4_EL1),
24722474
ID_UNALLOCATED(7,5),

0 commit comments

Comments
 (0)