ANDROID: KVM: arm64: Present the 16Kb granule support to the guest VMs

Extend the allow mask for the ID_AA64MMFR0_EL1 register to add support for
the 16Kb protected guest VMs. When the guest reads this register the
hypervisor traps the access and returns its configuration derived from
the host.

Bug: 376870129
Bug: 278749606
Test: boot a 16Kb protected guest VM on a 16Kb host
Change-Id: If7d50c7345fc4d9db9dbcca04f19b8bbbc70925e
Signed-off-by: Sebastian Ene <sebastianene@google.com>
This commit is contained in:
Sebastian Ene
2025-01-07 16:33:28 +00:00
parent 0405a25a6e
commit 092a580916

View File

@@ -110,12 +110,14 @@ void pkvm_host_reclaim_page(struct kvm *host_kvm, phys_addr_t ipa);
* - Distinction between Secure and Non-secure Memory
* - Mixed-endian at EL0 only
* - Non-context synchronizing exception entry and exit
* - 16Kb stage-1 granule support
*/
#define PVM_ID_AA64MMFR0_ALLOW (\
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_BIGEND) | \
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_SNSMEM) | \
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_BIGENDEL0) | \
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_EXS) \
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_EXS) | \
ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_TGRAN16) \
)
/*