All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] xen/riscv: fix boot on missing extensions and MMU setup bugs
@ 2026-09-29 16:29 Baptiste Le Duc
  2026-09-29 16:32 ` [PATCH v3 1/6] docs/riscv: sync required ISA extensions with required_extensions[] Baptiste Le Duc
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Baptiste Le Duc @ 2026-09-29 16:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Baptiste Le Duc, Andrew Cooper, Anthony PERARD, Michal Orzel,
	Jan Beulich, Julien Grall, Roger Pau Monné,
	Stefano Stabellini, Alistair Francis, Connor Davis,
	Oleksii Kurochko, Zheng Zhang

This series introduces bugs fixes that were found while bringing up CI
support for the HiFive Premier P550 board with a basic smoke test. The
board-support series itself will follow separately as it depends on
PLIC/vPLIC and dom0less support that have not been upstreamed yet. This
series carries only the independent fixes found along the way, none of them
need the board-support series to apply.

This series:
    1: Docs: sync required ISA extensions with required_extensions[]
    2: Rename PTE "permissions" to "pte_flags"
    3: Fix A/D bit handling in G-stage mappings
    4: Fix A/D bit handling in Xen's page-table mappings
    5: Use pte_is_valid() in pte_is_mapping()
    6: Make Zihintpause no longer a required extension

CI pipeline:
https://gitlab.com/xen-project/people/baptleduc/xen/-/pipelines/2894144143

---
Changes since v2:
- Drop v2 patches 5 and 6, already committed:
    d8ca89f26c8a ("xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu()")
    08a898b93d21 ("xen/riscv: fix level_map_mask truncation on load_start")
- Drop "xen/riscv: make Svpbmt no longer a required extension".
  It relaxed Svpbmt so boards without it, like the HiFive P550, could boot.
  But without Svpbmt, DMA-noncoherent devices do not snoop the CPU caches
  and can read stale data from DRAM. Mainline Linux has the same problem,
  which is explained and reproducible in [1]. Fixing it needs a lot of
  machinery we do not need yet, and Svpbmt is mandatory in RVA23, so
  keeping it required is simpler and safer. An RFC will follow with a fix
  inspired by [2].
- Add three new patches:
    docs/riscv: sync required ISA extensions with required_extensions[]
    xen/riscv: rename PTE "permissions" to "pte_flags"
    xen/riscv: use pte_is_valid() in pte_is_mapping()
- Address review comments.

[1] https://github.com/davidlohr/vanilla-kernel-sifive-p550/tree/master
[2] https://lwn.net/Articles/996819/
---
Changes since v1:
- address ML comments
- rename some patchs
- add new patch-fix: 242dd1f890e4 ("xen/riscv: fix level_map_mask
  truncation on load_start") discovered when working on Spacemit K3 support

To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Anthony PERARD <anthony.perard@vates.tech>
Cc: Michal Orzel <michal.orzel@amd.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: Roger Pau Monné <roger@xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Alistair Francis <alistair.francis@wdc.com>
Cc: Connor Davis <connojdavis@gmail.com>
Cc: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Cc: Zheng Zhang <Zheng Zhang <zhangzheng@iscas.ac.cn>

---
Baptiste Le Duc (5):
      xen/riscv: rename PTE "permissions" to "pte_flags"
      xen/riscv: fix A/D bit handling in G-stage mappings
      xen/riscv: fix A/D bits in Xen's page-table mappings
      xen/riscv: use pte_is_valid() in pte_is_mapping()
      xen/riscv: make Zihintpause no longer a required extension

Oleksii Kurochko (1):
      docs/riscv: sync required ISA extensions with required_extensions[]

 docs/misc/riscv/booting.txt             | 27 +++++++++++-----
 xen/arch/riscv/cpufeature.c             | 56 ++++++++++++++++++++++++++++++++-
 xen/arch/riscv/include/asm/cpufeature.h |  1 +
 xen/arch/riscv/include/asm/mm.h         |  5 +--
 xen/arch/riscv/include/asm/page.h       | 35 +++++++++++----------
 xen/arch/riscv/include/asm/sbi.h        |  8 +++++
 xen/arch/riscv/mm.c                     | 11 +++----
 xen/arch/riscv/p2m.c                    | 44 ++++++++------------------
 8 files changed, 123 insertions(+), 64 deletions(-)
---
base-commit: 4c1aba82cff95ab11f7fe4af8965a06703537288
change-id: 20260902-riscv-fix-boot-missing-ext-a79c23bad694

Best regards,
--  
Baptiste Le Duc <baptiste.le-duc@vates.tech>



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

end of thread, other threads:[~2026-10-01  7:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 16:29 [PATCH v3 0/6] xen/riscv: fix boot on missing extensions and MMU setup bugs Baptiste Le Duc
2026-09-29 16:32 ` [PATCH v3 1/6] docs/riscv: sync required ISA extensions with required_extensions[] Baptiste Le Duc
2026-09-30  6:18   ` Jan Beulich
2026-09-30 10:32   ` Oleksii Kurochko
2026-09-29 16:32 ` [PATCH v3 2/6] xen/riscv: rename PTE "permissions" to "pte_flags" Baptiste Le Duc
2026-09-30 12:07   ` Jan Beulich
2026-09-30 12:42     ` Baptiste Le Duc
2026-09-30 12:50       ` Jan Beulich
2026-09-30 12:46     ` [PATCH v3.1 " Baptiste Le Duc
2026-09-30 12:51       ` Baptiste Le Duc
2026-09-30 13:34     ` [PATCH v3 " Oleksii Kurochko
2026-09-30 13:04   ` [PATCH RESEND " Anthony PERARD
2026-09-30 13:42   ` [PATCH " Oleksii Kurochko
2026-09-30 13:54     ` Jan Beulich
2026-09-30 13:56       ` Oleksii Kurochko
2026-10-01  7:41     ` Jan Beulich
2026-09-29 16:32 ` [PATCH v3 3/6] xen/riscv: fix A/D bit handling in G-stage mappings Baptiste Le Duc
2026-09-30 12:20   ` Jan Beulich
2026-09-30 13:53     ` Oleksii Kurochko
2026-09-30 13:58       ` Jan Beulich
2026-09-30 14:03         ` Oleksii Kurochko
2026-09-29 16:32 ` [PATCH v3 4/6] xen/riscv: fix A/D bits in Xen's page-table mappings Baptiste Le Duc
2026-09-30 12:23   ` Jan Beulich
2026-09-30 14:37   ` Oleksii Kurochko
2026-09-29 16:32 ` [PATCH v3 5/6] xen/riscv: use pte_is_valid() in pte_is_mapping() Baptiste Le Duc
2026-09-30 10:45   ` Oleksii Kurochko
2026-09-29 16:32 ` [PATCH v3 6/6] xen/riscv: make Zihintpause no longer a required extension Baptiste Le Duc
2026-09-30 10:43   ` 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.