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

Ryan Roberts ryan.roberts at arm.com
Wed Sep 27 01:31:32 PDT 2023


On 27/09/2023 07:38, Oliver Upton wrote:
> 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.
> 

Yes, good idea. I'll add that in the next version.

Thanks for the review!



More information about the linux-arm-kernel mailing list