On Wed, Sep 09, 2026 at 05:34:37PM +0100, Leonardo Bras wrote: > On Tue, Sep 01, 2026 at 10:47:07PM +0100, Mark Brown wrote:
> > @@ -2193,10 +2193,12 @@ static u64 sanitise_id_aa64pfr1_el1(const struct
> > kvm_vcpu *vcpu, u64 val)
> > val &= ~ID_AA64PFR1_EL1_THE;
> > val &= ~ID_AA64PFR1_EL1_MTEX;
> > val &= ~ID_AA64PFR1_EL1_PFAR;
> And here it says to only mask the feature bit if it's not available.
> IIUC this sanitize function is called when resetting a vcpu, is that right?
Yes.
> > @@ -3444,7 +3446,6 @@ static const struct sys_reg_desc sys_reg_descs[] = {
> > ~(ID_AA64PFR1_EL1_PFAR |
> > ID_AA64PFR1_EL1_MTEX |
> > ID_AA64PFR1_EL1_THE |
> > - ID_AA64PFR1_EL1_GCS |
> > ID_AA64PFR1_EL1_MTE_frac |
> > ID_AA64PFR1_EL1_NMI |
> > ID_AA64PFR1_EL1_RNDR_trap |
> This one looks like to be a mask that's used to compare with
> arm64_ftr_regs[] on arm64_check_features(). That seems to be called on
> set_id_aa64pfr1_el1() which is used when we get an ioclt to set a system
> register.
> So, basically, does it use this mask to check if the set value is valid?
Yes, this excludes values that are never supported.
> Reviewed-by: Leonardo Bras <[email protected]>
Thanks!
signature.asc
Description: PGP signature

