<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi/sbi_sse.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_sse.c?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_sse.c?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2026-09-01T07:27:33Z</updated>
<entry>
<title>lib: sbi: sse: clear SPV for non-virtualized events</title>
<updated>2026-09-01T07:27:33Z</updated>
<author>
<name>Zhanpeng Zhang</name>
<email>zhangzhanpeng.jasper@bytedance.com</email>
</author>
<published>2026-07-31T07:18:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=35511bc6ee1c9c17b6a89b44c52e2044bb51b979'/>
<id>urn:sha1:35511bc6ee1c9c17b6a89b44c52e2044bb51b979</id>
<content type='text'>
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 &lt;zhangzhanpeng.jasper@bytedance.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260731071820.7318-1-zhangzhanpeng.jasper@bytedance.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: fix sse_event_inject() status setting</title>
<updated>2026-03-10T07:51:29Z</updated>
<author>
<name>Charlie Jenkins</name>
<email>thecharlesjenkins@gmail.com</email>
</author>
<published>2026-03-02T22:54:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6d5b2b9b056826e072c387a068e3f8e6700b5cae'/>
<id>urn:sha1:6d5b2b9b056826e072c387a068e3f8e6700b5cae</id>
<content type='text'>
sse_event_inject() currently sets all status bits to 1 except for
SBI_SSE_ATTR_STATUS_PENDING_OFFSET which it sets to zero. Instead of
overwriting all the values of the status bits, sse_event_inject() is
only expected to clear SBI_SSE_ATTR_STATUS_PENDING_OFFSET. Fix
sse_event_inject() to only do the clearing.

Signed-off-by: Charlie Jenkins &lt;thecharlesjenkins@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260302-event_inject_fix-v1-1-e88952b03aa4@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Replace sbi_hart_pmp_xyz() and sbi_hart_map/unmap_addr()</title>
<updated>2025-12-16T14:46:47Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2025-12-09T13:52:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=42139bb9b7dc10dcf5432cc34eb1bf2e233ef359'/>
<id>urn:sha1:42139bb9b7dc10dcf5432cc34eb1bf2e233ef359</id>
<content type='text'>
The sbi_hart_pmp_xyz() and sbi_hart_map/unmap_addr() functions can
now be replaced by various sbi_hart_protection_xyz() functions.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20251209135235.423391-5-apatel@ventanamicro.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Add support for SSTATUS.SDT</title>
<updated>2025-03-27T12:46:44Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3ac49712e3bcfd8d64cd17511e27b7836821e41c'/>
<id>urn:sha1:3ac49712e3bcfd8d64cd17511e27b7836821e41c</id>
<content type='text'>
Similarly to what is done for SPELP, handle SSTATUS.SDT upon event
injection. In order to mimick an interrupt, set SDT to 1 for injection and
save its previous value in interrupted_flags[5:5]. Restore it upon
completion.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Add support for SSTATUS.SPELP</title>
<updated>2025-03-27T12:46:28Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b4464b22e4d3780ad73318af6091cea1d72404d1'/>
<id>urn:sha1:b4464b22e4d3780ad73318af6091cea1d72404d1</id>
<content type='text'>
As raised during the ARC review, SPELP was not handled during the event
injection process. Save it as part of the interrupted flags, clear it
before injecting the event and restore it after completion.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Remove superfluous parenthesis around MSTATUS_* values</title>
<updated>2025-03-27T12:46:19Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=53d322f8aeff9da1c016802e0a5a5ef2ecfd1b2a'/>
<id>urn:sha1:53d322f8aeff9da1c016802e0a5a5ef2ecfd1b2a</id>
<content type='text'>
For some reason, there was a pair of useless parenthesis around MSTATUS_*
value usage. Remove them.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Rename STATUS* interrupted flags to SSTATUS*</title>
<updated>2025-03-27T12:45:44Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=41fb89cb295e5b1c454c3e63cc382270b160c2b5'/>
<id>urn:sha1:41fb89cb295e5b1c454c3e63cc382270b160c2b5</id>
<content type='text'>
As raised by Andrew on the kvm-unit-test review, this flags are meant to
hold SSTATUS bits in the specification. Rename them to match that.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Return SBI_EDENIED for read only parameters.</title>
<updated>2025-03-27T12:45:25Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1e7258d6a81097e7a003aed860f98bcb1d8c58a7'/>
<id>urn:sha1:1e7258d6a81097e7a003aed860f98bcb1d8c58a7</id>
<content type='text'>
The SSE specification did specified that read only parameters should
return SBI_EBADRANGE but was modified recently to return SBI_EDENIED.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Remove printf from sbi_sse_exit()</title>
<updated>2025-03-27T12:45:10Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5dc7a6db6f9adb7d18029691bf42d20f4b10d3cd'/>
<id>urn:sha1:5dc7a6db6f9adb7d18029691bf42d20f4b10d3cd</id>
<content type='text'>
This printf is mainly useful for debugging, remove it.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Update SSE event ids</title>
<updated>2025-03-27T12:33:41Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=601bea45c50664310aaf6470ff27935ca09fe987'/>
<id>urn:sha1:601bea45c50664310aaf6470ff27935ca09fe987</id>
<content type='text'>
The latest specification added new high priority RAS events and renamed
the PMU to PMU_OVERFLOW.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
</feed>
