[PATCH 0/2] lib: sbi_ipi: Return error for invalid hartids

Andrew Jones ajones at ventanamicro.com
Fri Mar 14 09:30:22 PDT 2025


Add sbi_hartmask_weight() and use it to check for invalid hartids
in SBI IPI. Fixes a bug found with the kvm-unit-tests SBI tests.

Andrew Jones (2):
  sbi: Introduce sbi_hartmask_weight
  lib: sbi_ipi: Return error for invalid hartids

 include/sbi/sbi_bitmap.h   | 13 +++++++++++++
 include/sbi/sbi_bitops.h   | 22 +++++++++++++++-------
 include/sbi/sbi_hartmask.h | 11 +++++++++++
 lib/sbi/sbi_ipi.c          |  9 +++++++++
 4 files changed, 48 insertions(+), 7 deletions(-)

-- 
2.48.1




More information about the opensbi mailing list