On Fri, 16 Oct 2026 18:10:47 +0800 Jinjie Ruan <[email protected]> wrote:
> From: Jinjie Ruan <[email protected]> > > The arm_mpam driver picks the MBA-backing class for the MBPRI > pseudo-resource, which requires the memory-side MSC to advertise > HAS_PRI_PART -- without it the driver never exposes MBPRI even > though the register is handled. Assemble the same PRI_IDR view > (INTPRI, 2 bits, 0 = low) as the cache subtype. Don't talk about driver in the qemu code except perhaps to say it was tested with that driver. In theory any random software is expected to work on top of the qemu. Otherwise feels like this could be pushed back to an earlier patch that implemented the register support (and forgot to set up the discovery bits?) > > Signed-off-by: Jinjie Ruan <[email protected]> > --- > hw/arm/mpam.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/hw/arm/mpam.c b/hw/arm/mpam.c > index 1bd76ba..50c8a8e 100644 > --- a/hw/arm/mpam.c > +++ b/hw/arm/mpam.c > @@ -991,6 +991,18 @@ static void mpam_msc_mem_realize(DeviceState *dev, Error > **errp) > mpamf->idr = FIELD_DP64(mpamf->idr, MPAMF_IDR, HAS_MSMON, 1); > /* Memory specific bit */ > mpamf->idr = FIELD_DP64(mpamf->idr, MPAMF_IDR, HAS_MBW_PART, 1); > + /* > + * Priority partitioning on the memory side too: the driver exposes > + * the MBPRI pseudo-resource from the class backing MBA, which > + * requires the memory-side MSC to advertise HAS_PRI_PART. > + */ > + mpamf->idr = FIELD_DP64(mpamf->idr, MPAMF_IDR, HAS_PRI_PART, 1); > + mpamf->pri_idr = FIELD_DP32(mpamf->pri_idr, MPAMF_PRI_IDR, > + HAS_INTPRI, 1); > + mpamf->pri_idr = FIELD_DP32(mpamf->pri_idr, MPAMF_PRI_IDR, > + INTPRI_0_IS_LOW, 1); > + mpamf->pri_idr = FIELD_DP32(mpamf->pri_idr, MPAMF_PRI_IDR, > + INTPRI_WD, 2); > > mpamf->msmon_idr = FIELD_DP32(mpamf->msmon_idr, > MPAMF_MSMON_IDR, MSMON_MBWU, 1);
