From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Romain Caritey" <Romain.Caritey@microchip.com>,
"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: [PATCH v2 0/4] RISCV: Intrdouce SSTC support in Xen
Date: Tue, 31 Mar 2026 21:04:15 +0200 [thread overview]
Message-ID: <cover.1774863161.git.oleksii.kurochko@gmail.com> (raw)
This patch series is created based on [1] and the aim is to make Xen properly
works when SSTC extension is available.
It is needed to do in this way as OpenSBI doesn't pass that it supports SSTC
by DTS to Xen and there is no easy way to turn off support of SSTC support.
Also, as a part of this patch series intrdouce suggested [2] by Jan B.
improvements of init_csr_masks().
[1] https://lore.kernel.org/xen-devel/cover.1772814110.git.oleksii.kurochko@gmail.com/T/#mc14576ef43a83b344c5f31626005b995e2ccbeaa
[2] https://lore.kernel.org/xen-devel/cover.1772814110.git.oleksii.kurochko@gmail.com/T/#m9c18d2d7a98958befec16419f5deccc40f6c8c3e
CI tests: https://gitlab.com/xen-project/people/olkur/xen/-/pipelines/2417456208
Also, I've manually ran QEMU with SSTC=on/off and built Xen with a newer RISC-V
compileer (in comparison with the version used by CI's docker container) to
verify CONFIG_CC_HAS_ASM_GOTO_OUTPUT branch inside csr_read_safe().
---
Changes in v2:
- Address the comments from ML.
---
Oleksii Kurochko (4):
xen/riscv: add exception table support
xen/riscv: add csr_allowed_read() helper
xen/riscv: allow Xen to use SSTC while hiding it from guests
xen/riscv: init_csr_masks()-related improvements
xen/arch/riscv/Kconfig | 1 +
xen/arch/riscv/Makefile | 1 +
xen/arch/riscv/cpufeature.c | 33 ++++++++
xen/arch/riscv/domain.c | 29 +++----
xen/arch/riscv/extable.c | 85 +++++++++++++++++++++
xen/arch/riscv/include/asm/bug.h | 2 +
xen/arch/riscv/include/asm/cpufeature.h | 1 +
xen/arch/riscv/include/asm/csr.h | 36 ++++++++-
xen/arch/riscv/include/asm/extable.h | 58 ++++++++++++++
xen/arch/riscv/include/asm/riscv_encoding.h | 2 +
xen/arch/riscv/setup.c | 3 +
xen/arch/riscv/time.c | 34 +++++----
xen/arch/riscv/traps.c | 5 ++
xen/arch/riscv/vtimer.c | 7 +-
xen/arch/riscv/xen.lds.S | 3 +
xen/arch/x86/xen.lds.S | 6 +-
xen/include/xen/xen.lds.h | 6 ++
17 files changed, 277 insertions(+), 35 deletions(-)
create mode 100644 xen/arch/riscv/extable.c
create mode 100644 xen/arch/riscv/include/asm/extable.h
--
2.53.0
next reply other threads:[~2026-03-31 19:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 19:04 Oleksii Kurochko [this message]
2026-03-31 19:04 ` [PATCH v2 1/4] xen/riscv: add exception table support Oleksii Kurochko
2026-04-02 6:24 ` Jan Beulich
2026-04-08 9:29 ` Oleksii Kurochko
2026-04-08 9:45 ` Andrew Cooper
2026-03-31 19:04 ` [PATCH v2 2/4] xen/riscv: add csr_read_safe() helper Oleksii Kurochko
2026-04-02 6:30 ` Jan Beulich
2026-04-08 9:38 ` Oleksii Kurochko
2026-03-31 19:04 ` [PATCH v2 3/4] xen/riscv: allow Xen to use SSTC while hiding it from guests Oleksii Kurochko
2026-04-02 6:41 ` Jan Beulich
2026-04-08 10:58 ` Oleksii Kurochko
2026-04-08 11:25 ` Jan Beulich
2026-04-08 11:52 ` Oleksii Kurochko
2026-03-31 19:04 ` [PATCH v2 4/4] xen/riscv: init_csr_masks()-related improvements Oleksii Kurochko
2026-04-01 6:19 ` Jan Beulich
2026-04-01 13:39 ` Oleksii Kurochko
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=cover.1774863161.git.oleksii.kurochko@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=Romain.Caritey@microchip.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.