Re: [PATCH v2] KVM: arm64: Trap guest MPAM accesses whenever MPAM is implemented
From: Fuad Tabba
Date: Fri Sep 11 2026 - 07:13:07 EST
On Thu, 10 Sept 2026 at 12:08, Marc Zyngier <maz@xxxxxxxxxx> wrote:
...
> > --- a/arch/arm64/include/asm/cpufeature.h
> > +++ b/arch/arm64/include/asm/cpufeature.h
> > @@ -873,6 +873,11 @@ static __always_inline bool system_supports_mpam_hcr(void)
> > return alternative_has_cap_unlikely(ARM64_MPAM_HCR);
> > }
> >
> > +static __always_inline bool system_supports_mpam_sysregs(void)
> > +{
> > + return alternative_has_cap_unlikely(ARM64_MPAM_SYSREGS);
> > +}
> > +
>
> What is the rationale for choosing alternative_has_cap_unlikely()
> instead of cpus_have_final_cap(), which is more wildly used?
Not a good one to be honest, and it's gone in V3.
Cheers,
/fuad
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.