All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4]  RISCV: Intrdouce SSTC support in Xen
@ 2026-03-31 19:04 Oleksii Kurochko
  2026-03-31 19:04 ` [PATCH v2 1/4] xen/riscv: add exception table support Oleksii Kurochko
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Oleksii Kurochko @ 2026-03-31 19:04 UTC (permalink / raw)
  To: xen-devel
  Cc: Romain Caritey, Oleksii Kurochko, Alistair Francis, Connor Davis,
	Andrew Cooper, Anthony PERARD, Michal Orzel, Jan Beulich,
	Julien Grall, Roger Pau Monné, Stefano Stabellini

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



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-04-08 11:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 19:04 [PATCH v2 0/4] RISCV: Intrdouce SSTC support in Xen Oleksii Kurochko
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

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.