From: "Radim Krčmář" <radim.krcmar@oss.qualcomm.com>
To: <dave.patel@riscstar.com>, "Samuel Holland" <samuel.holland@sifive.com>
Cc: "Scott Bambrough" <scott@riscstar.com>,
"Robin Randhawa" <robin.randhawa@sifive.com>,
"Anup Patel" <anup.patel@qti.qualcomm.com>,
"Ray Mao" <raymond.mao@riscstar.com>,
"Anup Patel" <anuppate@qti.qualcomm.com>,
"Dhaval" <dhaval@rivosinc.com>,
"Peter Lin" <peter.lin@sifive.com>, <opensbi@lists.infradead.org>,
"opensbi" <opensbi-bounces@lists.infradead.org>
Subject: Re: [PATCH v3 1/3] lib: sbi: Add RISC-V vector context save/restore support
Date: Thu, 02 Apr 2026 15:35:05 +0200 [thread overview]
Message-ID: <DHIPIKMRJ56H.UTR2JQR6X23E@oss.qualcomm.com> (raw)
In-Reply-To: <20260331055858.305207-2-dave.patel@riscstar.com>
2026-03-31T06:58:55+01:00, <dave.patel@riscstar.com>:
> From: Dave Patel <dave.patel@riscstar.com>
>
> Eager context switch: Add support for saving and restoring RISC-V vector
> extension state in OpenSBI. This introduces a per-hart vector context
> structure and helper routines to perform full context save and restore.
>
> The vector context includes vl, vtype, vcsr CSRs along with storage for all
> 32 vector registers. The register state is saved and restored using byte-wise
> vector load/store instructions (vse8.v/vle8.v), making the implementation
> independent of current SEW/LMUL configuration.
>
> The implementation follows an eager context switching model where the entire
> vector state is saved and restored on every context switch. This provides a
> simple and deterministic mechanism without requiring lazy trap-based
> management.
>
> Notes:
> - The SBI_MAX_VLENB is configured using CONFIG_SBI_MAX_VLENB.
>
> Signed-off-by: Dave Patel <dave.patel@riscstar.com>
> ---
You missed my comment on [v2 1/3]:
https://lore.kernel.org/opensbi/DHG4IUERGFUV.3TT9CFPZ9YEDG@qti.qualcomm.com/
The two points are:
1. Possible cross-domain data access.
2. Writes to read-only CSRs.
Thanks.
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next prev parent reply other threads:[~2026-04-02 13:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 5:58 [PATCH v3 0/3] Add eager FP and RISC-V vector context switching support dave.patel
2026-03-31 5:58 ` [PATCH v3 1/3] lib: sbi: Add RISC-V vector context save/restore support dave.patel
2026-04-02 13:35 ` Radim Krčmář [this message]
2026-03-31 5:58 ` [PATCH v3 2/3] lib: sbi: Add floating-point " dave.patel
2026-04-02 13:40 ` Radim Krčmář
2026-03-31 5:58 ` [PATCH v3 3/3] lib: sbi: domain FP/Vector context support for context switch dave.patel
2026-04-02 13:54 ` Radim Krčmář
-- strict thread matches above, loose matches on Subject: below --
2026-03-27 17:15 [PATCH v3 0/3] Add eager FP and RISC-V vector context switching support dave.patel
2026-03-27 17:15 ` [PATCH v3 1/3] lib: sbi: Add RISC-V vector context save/restore support dave.patel
2026-03-30 12:42 ` Radim Krcmar
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=DHIPIKMRJ56H.UTR2JQR6X23E@oss.qualcomm.com \
--to=radim.krcmar@oss.qualcomm.com \
--cc=anup.patel@qti.qualcomm.com \
--cc=anuppate@qti.qualcomm.com \
--cc=dave.patel@riscstar.com \
--cc=dhaval@rivosinc.com \
--cc=opensbi-bounces@lists.infradead.org \
--cc=opensbi@lists.infradead.org \
--cc=peter.lin@sifive.com \
--cc=raymond.mao@riscstar.com \
--cc=robin.randhawa@sifive.com \
--cc=samuel.holland@sifive.com \
--cc=scott@riscstar.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