From: Radim Krcmar <rkrcmar@qti.qualcomm.com>
To: Theodorus Wensan Februanto
<theodoruswensanfebruanto025@gmail.com>,
"opensbi@lists.infradead.org" <opensbi@lists.infradead.org>
Cc: opensbi <opensbi-bounces@lists.infradead.org>
Subject: Re: [RFC PATCH v2 6/8] lib: sbi: Preserve supervisor AIA interrupt priorities
Date: Tue, 27 Oct 2026 18:51:28 +0000 [thread overview]
Message-ID: <DMFUI43WQAMF.145H1SIVORHEL@qti.qualcomm.com> (raw)
In-Reply-To: <20261023070925.241680-7-theodoruswensanfebruanto025@gmail.com>
2026-10-23T00:09:23-07:00, Theodorus Wensan Februanto <theodoruswensanfebruanto025@gmail.com>:
> The siselect/sireg window exposes supervisor interrupt priority state
> at selector values 0x30 through 0x3f. Save and restore the implemented
> bank across domain switches when Smaia is available.
>
> Only sireg is accessed in this selector range. The other sireg windows
> can trap and must not be read. IMSIC indirect registers at 0x70-0xff
> are not handled in this change.
Simply context switching IMSIC files through 0x70-0xff wouldn't bring us
much closer to implementing AIA for domains.
In systems without Smsdia, I think it would be better to give AIA only
to a single domain on each hart and prevent access from other domains,
because it's not like concurent domains can sanely share AIA anyway.
To prevent other domains from accessing AIA, we'd need machinery to
define the set of available features for each domain, and manipulate
mstateen.
> Link: https://github.com/riscv-software-src/opensbi/issues/433
> Signed-off-by: Theodorus Wensan Februanto <theodoruswensanfebruanto025@gmail.com>
> ---
> diff --git a/lib/sbi/sbi_domain_context.c b/lib/sbi/sbi_domain_context.c
> @@ -93,6 +93,8 @@ struct hart_context {
> + /** AIA supervisor interrupt priority register bank */
> + unsigned long siprio[16];
The priorities are u32[16] or u64[8], although the code wastes memory to
look very clean, so I'm not sure we want to optimize...
Thanks.
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next prev parent reply other threads:[~2026-10-27 18:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 7:09 [RFC PATCH v2 0/8] Preserve more architectural state across domain switches Theodorus Wensan Februanto
2026-10-23 7:09 ` [RFC PATCH v2 1/8] lib: sbi: Preserve hypervisor " Theodorus Wensan Februanto
2026-10-27 18:20 ` Radim Krcmar
2026-10-23 7:09 ` [RFC PATCH v2 2/8] lib: sbi: Preserve optional H-extension " Theodorus Wensan Februanto
2026-10-27 18:24 ` Radim Krcmar
2026-10-23 7:09 ` [RFC PATCH v2 3/8] lib: sbi: Preserve Sstc timer " Theodorus Wensan Februanto
2026-10-23 7:09 ` [RFC PATCH v2 4/8] lib: sbi: Preserve supervisor count inhibit configuration Theodorus Wensan Februanto
2026-10-23 7:09 ` [RFC PATCH v2 5/8] lib: sbi: Preserve the supervisor indirect CSR selector Theodorus Wensan Februanto
2026-10-23 7:09 ` [RFC PATCH v2 6/8] lib: sbi: Preserve supervisor AIA interrupt priorities Theodorus Wensan Februanto
2026-10-27 18:51 ` Radim Krcmar [this message]
2026-10-23 7:09 ` [RFC PATCH v2 7/8] lib: sbi: Preserve supervisor CTR records across domain switches Theodorus Wensan Februanto
2026-10-23 7:09 ` [RFC PATCH v2 8/8] lib: sbi: Preserve vl and vtype during " Theodorus Wensan Februanto
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=DMFUI43WQAMF.145H1SIVORHEL@qti.qualcomm.com \
--to=rkrcmar@qti.qualcomm.com \
--cc=opensbi-bounces@lists.infradead.org \
--cc=opensbi@lists.infradead.org \
--cc=theodoruswensanfebruanto025@gmail.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