[PATCH 0/8] SmePMP bugfixes and improvement

Yu-Chien Peter Lin
2025-08-14T14:16:58Z

This series improves SmePMP related functions and fixes
the access fault during domain context switch when SmePMP
is enabled.

Yu-Chien Peter Lin (8):
lib: sbi_hart: move sbi_hart_get_smepmp_flags() to sbi_domain
lib: sbi_domain: allow specifying inaccessible region
lib: sbi_domain: print unsupported SmePMP permissions
lib: sbi_hart: add error message for insufficient PMP entries
lib: sbi_domain_context: skip the reserved entry during domain context
switch
lib: sbi_domain: add SBI_DOMAIN_MEMREGION_FW memregion flag
lib: sbi_domain: ensure consistent firmware PMP entries
lib: sbi_domain_context: preserve firmware PMP entries during domain
context switch

include/sbi/sbi_domain.h | 11 ++++
lib/sbi/sbi_domain.c | 99 +++++++++++++++++++++++++++++++++++-
lib/sbi/sbi_domain_context.c | 48 +++++++++++++++++
lib/sbi/sbi_hart.c | 86 +++++--------------------------
4 files changed, 170 insertions(+), 74 deletions(-)