[PATCH] lib: sbi_ipi: Validate hartids against domain, not HSM state

Chen Pei cp0613 at linux.alibaba.com
Tue Jul 7 06:09:32 PDT 2026


Hello everyone,

Friendly ping on this patch. Is there any comment on this fix? Thanks.

To summarize, commit 37eaca4ab33d ("lib: sbi_ipi: Return error for
invalid hartids") added a weight check against the HSM-interruptible
mask. This causes sbi_ipi_send_many() to return SBI_EINVAL when the
kernel sends a remote fence whose hmask includes a hart that was
stopped by CPU hotplug, because STOPPED harts are excluded from the
HSM-interruptible mask:

  __sbi_rfence_v02_call: hbase = [0] hmask = [0x3] failed (error [-22])

This patch changes the validation to use the domain's assigned hartmask
instead, which still rejects truly invalid or cross-domain hartids
while allowing HSM-STOPPED harts to be silently skipped.

Thanks,
Pei



More information about the opensbi mailing list