summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ecall_replace.c
diff options
context:
space:
mode:
authorZhanpeng Zhang <[email protected]>2026-07-31 15:18:20 +0800
committerAnup Patel <[email protected]>2026-09-01 12:57:33 +0530
commit35511bc6ee1c9c17b6a89b44c52e2044bb51b979 (patch)
tree600996ef9f8d2f2a48ddec5136ce05ace05310b6 /lib/sbi/sbi_ecall_replace.c
parent22a5f98b3965adb2c5b2224da7ec4590807a618a (diff)
lib: sbi: sse: clear SPV for non-virtualized eventsHEADmaster
SSE injection sets hstatus.SPV to the virtualization state of the interrupted context before entering the supervisor handler. This patch completes that existing requirement and does not change the SSE ABI. The existing code sets SPV when the interrupted context is virtualized, but leaves it unchanged otherwise. A stale SPV value can therefore make an event that interrupted host execution appear to have interrupted a guest. Event completion can then resume with virtualization enabled. Clear SPV when the interrupted context is not virtualized so the handler-visible state matches the interrupted context. This also lets supervisor software, such as the Linux PMU and perf code, reliably tell whether an SSE interrupted host or virtualized execution. Fixes: c8cdf01d8f3a ("lib: sbi: Add support for Supervisor Software Events extension") Signed-off-by: Zhanpeng Zhang <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/sbi/sbi_ecall_replace.c')
0 files changed, 0 insertions, 0 deletions