[PATCH v8 2/5] riscv_cbqri: resctrl: Add cache allocation via capacity block mask
Drew Fustini
fustini at kernel.org
Thu Sep 17 12:59:10 PDT 2026
On Thu, Sep 17, 2026 at 04:57:42PM +0000, sashiko-bot at kernel.org wrote:
> > + d = cbqri_create_ctrl_domain(ctrl, &hw_res->resctrl_res, cpu,
> > + ci->id);
>
> [Severity: Medium]
> Does this bypass the capability agreement check for dynamically registered
> controllers?
This is a valid point. cbqri_resctrl_pick_caches() only compares the
controllers present at late_initcall, and riscv_cbqri_register_cc_dt()
does not refuse a later registration. The scope is limited as this
driver is built-in, and DT overlay is not likely for a cache controller.
> Could this cause capacity configuration operations to fail gracefully with
> -EIO when hardware limits are exceeded, or otherwise abort CPU hotplug?
It depends on the mismatch:
- If the late controller has fewer capacity blocks the read-back check
in cbqri_apply_cache_config() fails with -EIO, the domain is not
created and the CPU online is rolled back.
- If it has more blocks the domain comes up and only the upper blocks
stay unused.
I will add the cbqri_cc_caps_agree() check to
cbqri_attach_cpu_to_all_ctrls() to eliminate the above issues.
Drew
More information about the linux-riscv
mailing list