OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Atish Patra <atish.patra@linux.dev>
To: dong wei <weidong.wd@bytedance.com>, opensbi@lists.infradead.org
Cc: cuiyunhui@bytedance.com, heshuan@bytedance.com,
	wangziang.ok@bytedance.com, anup@brainfault.org
Subject: Re: [PATCH] lib: sbi: sse: add local unknown nmi event
Date: Thu, 30 Oct 2025 01:51:25 -0700	[thread overview]
Message-ID: <a4030e75-a8d8-447d-a743-e66e5ad9242f@linux.dev> (raw)
In-Reply-To: <CAHLiX_GptyEw9BX8cCC9q-S6jy12gYFWYz8WdN1=w8yf-0BLZQ@mail.gmail.com>

On 10/30/25 1:20 AM, dong wei wrote:
> May I ask if there are any updates to the comments on this patch? The
> unknown nmi event has practical application scenarios for RISC-V
> servers.
> 

The corresponding Linux kernel patches doesn't match this. We need to 
hash out the event IDs and then decide the process to merge this to SBI 
spec.

It should be okay to merge this in OpenSBI as an experimental feature 
after that.


Do you have a PoC on how this is hooked up to a platform NMI event ?

> On Wed, Oct 15, 2025 at 10:18 PM dong wei <weidong.wd@bytedance.com> wrote:
>>
>> Add more reviewers.
>>
>> On Tue, Oct 14, 2025 at 1:54 PM weidongwd <weidong.wd@bytedance.com> wrote:
>>>
>>> Add the id of local unknown nmi event and add this event to the
>>> list of supported events.
>>>
>>> Signed-off-by: weidongwd <weidong.wd@bytedance.com>
>>> ---
>>>   include/sbi/sbi_ecall_interface.h | 3 ++-
>>>   lib/sbi/sbi_sse.c                 | 8 +++++++-
>>>   2 files changed, 9 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
>>> index af7a05a..8bb0d39 100644
>>> --- a/include/sbi/sbi_ecall_interface.h
>>> +++ b/include/sbi/sbi_ecall_interface.h
>>> @@ -436,7 +436,8 @@ enum sbi_sse_state {
>>>
>>>   /* Range 0xffff0000 - 0xffffffff */
>>>   #define SBI_SSE_EVENT_LOCAL_SOFTWARE           0xffff0000
>>> -#define SBI_SSE_EVENT_LOCAL_RESERVED_3_START   0xffff0001
>>> +#define SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI                0xffff0001
>>> +#define SBI_SSE_EVENT_LOCAL_RESERVED_3_START   0xffff0002
>>>   #define SBI_SSE_EVENT_LOCAL_RESERVED_3_END     0xffff3fff
>>>   #define SBI_SSE_EVENT_LOCAL_PLAT_3_START       0xffff4000
>>>   #define SBI_SSE_EVENT_LOCAL_PLAT_3_END         0xffff7fff
>>> diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c
>>> index 986b770..e771efe 100644
>>> --- a/lib/sbi/sbi_sse.c
>>> +++ b/lib/sbi/sbi_sse.c
>>> @@ -182,9 +182,14 @@ struct sse_event_info global_software_event = {
>>>          SBI_SLIST_NODE_INIT(NULL),
>>>   };
>>>
>>> +struct sse_event_info local_unknown_nmi_event = {
>>> +       .event_id = SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI,
>>> +       SBI_SLIST_NODE_INIT(&global_software_event),
>>> +};
>>> +
>>>   struct sse_event_info local_software_event = {
>>>          .event_id = SBI_SSE_EVENT_LOCAL_SOFTWARE,
>>> -       SBI_SLIST_NODE_INIT(&global_software_event),
>>> +       SBI_SLIST_NODE_INIT(&local_unknown_nmi_event),
>>>   };
>>>
>>>   static SBI_SLIST_HEAD(supported_events, sse_event_info) =
>>> @@ -202,6 +207,7 @@ static const uint32_t standard_events[] = {
>>>          SBI_SSE_EVENT_LOCAL_LOW_PRIO_RAS,
>>>          SBI_SSE_EVENT_GLOBAL_LOW_PRIO_RAS,
>>>          SBI_SSE_EVENT_LOCAL_SOFTWARE,
>>> +       SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI,
>>>          SBI_SSE_EVENT_GLOBAL_SOFTWARE,
>>>   };
>>>
>>> --
>>> 2.20.1
>>>
> 


-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

  reply	other threads:[~2025-10-30  8:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14  5:53 [PATCH] lib: sbi: sse: add local unknown nmi event weidongwd
2025-10-15 14:18 ` dong wei
2025-10-30  8:20   ` dong wei
2025-10-30  8:51     ` Atish Patra [this message]
2025-11-03  8:15       ` [External] " dong wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4030e75-a8d8-447d-a743-e66e5ad9242f@linux.dev \
    --to=atish.patra@linux.dev \
    --cc=anup@brainfault.org \
    --cc=cuiyunhui@bytedance.com \
    --cc=heshuan@bytedance.com \
    --cc=opensbi@lists.infradead.org \
    --cc=wangziang.ok@bytedance.com \
    --cc=weidong.wd@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox