Re: [PATCH v7 15/24] x86/resctrl: Implement resctrl_arch_assign_cntr to assign a counter with ABMC

From: Reinette Chatre
Date: Thu Sep 19 2024 - 13:13:38 EST


Hi Babu,

In subject, please use "()" for a function.

On 9/4/24 3:21 PM, Babu Moger wrote:
> +/*
> + * Send an IPI to the domain to assign the counter to RMID, event pair.
> + */
> +int resctrl_arch_assign_cntr(struct rdt_resource *r, struct rdt_mon_domain *d,
> + enum resctrl_event_id evtid, u32 rmid, u32 closid,
> + u32 cntr_id, bool assign)

Looking ahead this is also called when config of existing assigned counter is
changed. Should this thus perhaps be resctrl_arch_config_cntr()?

> +{
> + struct rdt_hw_mon_domain *hw_dom = resctrl_to_arch_mon_dom(d);
> + union l3_qos_abmc_cfg abmc_cfg = { 0 };
> + struct arch_mbm_state *arch_mbm;
> +
> + abmc_cfg.split.cfg_en = 1;

Just to confirm ... a counter remains "configured" from the hardware side whether it
is assigned from resctrl perspective or not? It seems to me that once a counter is
"unassigned" from resctrl perspective it needs no more context about that
counter, yet it remains configured from hardware side?

Reinette