diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-18 12:39:29 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-08-08 11:40:39 +0530 |
| commit | f06b670cfd1c93968f587a14f2ceaa46d4c42f28 (patch) | |
| tree | 44892a181c51336078b82a9861eff45b667f4768 /include/linux/workqueue_api.h | |
| parent | 4a94f45ef7207bf4d7b7903dde46437d67020f5c (diff) | |
RISC-V: KVM: Avoid one-word masks for SBI v0.1 all-harts
KVM already treats a NULL hart-mask pointer in SBI v0.1 calls as all
harts, matching OpenSBI's legacy handling. The current handler builds that
target set as (1UL << online_vcpus) - 1 before iterating the mask.
That expression shifts by the type width once the VM has BITS_PER_LONG
online vCPUs, and a single word cannot represent larger VMs. A count-based
mask also selects the wrong IDs when vCPU IDs are sparse.
Handle SEND_IPI with a NULL hart-mask by iterating all online vCPUs
directly. For remote fence calls, use the existing hbase == -1UL
convention so the common fence request helper targets the whole VM
without consulting hmask.
Non-NULL guest hart masks keep the existing v0.1 behavior.
Fixes: a046c2d8578c ("RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260718040000.010.826fe94e-caplitmus-rv@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
