[PATCH v3 04/13] KVM: arm64: Add ARM64_HAS_LPA2 CPU capability

Oliver Upton oliver.upton at linux.dev
Tue Sep 26 23:38:43 PDT 2023


Hi Ryan,

On Mon, Sep 18, 2023 at 07:57:31AM +0100, Ryan Roberts wrote:

[...]

> +static bool has_lpa2(const struct arm64_cpu_capabilities *entry, int scope)
> +{
> +	u64 mmfr0;
> +
> +	mmfr0 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR0_EL1);
> +	return has_lpa2_at_stage1(mmfr0) && has_lpa2_at_stage2(mmfr0);

Should we only require consistency between stage-1 and stage-2 if KVM
kvm_get_mode() != KVM_MODE_NONE? In case there are systems that have
mismatched LPA2 support users can just disable KVM to use the feature.

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list