Files
xen/docs/misc/riscv/booting.txt
T
Oleksii Kurochko b3d5fad63a xen/riscv: introduce support of Svpbmt extension and make it mandatory
Svpbmt extension is necessary for chaning the memory type for a page contains
a combination of attributes that indicate the cacheability, idempotency,
and ordering properties for access to that page.

As a part of the patch the following is introduced:
- Svpbmt memory type defintions: PTE_PBMT_{NOCACHE,IO}.
- PAGE_HYPERVISOR_{NOCACHE,WC}.
- RISCV_ISA_EXT_svpbmt and add a check in runtime that Svpbmt is
  supported by platform.
- Update riscv/booting.txt with information about Svpbmt.
- Update logic of pt_update_entry() to take into account PBMT bits.

Use 'unsigned long' for pte_attr_t as PBMT bits are 61 and 62 and it doesn't
fit into 'unsigned int'. Also, update function prototypes which uses
'unsigned int' for flags/attibutes.

Enable Svpbmt for testing in QEMU as it is now mandatory for Xen work.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2025-06-02 12:42:23 +02:00

25 lines
1.0 KiB
Plaintext

System requirements
===================
The following extensions are expected to be supported by a system on which
Xen is run:
- H:
Provides additional instructions and CSRs that control the new stage of
address translation and support hosting a guest OS in virtual S-mode
(VS-mode).
- Zbb:
RISC-V doesn't have a CLZ instruction in the base ISA.
As a consequence, __builtin_ffs() emits a library call to ffs() on GCC,
or a de Bruijn sequence on Clang.
Zbb extension adds a CLZ instruction, after which __builtin_ffs() emits
a very simple sequence.
The similar issue occurs with other __builtin_<bitop>, so it is needed to
provide a generic version of bitops in RISC-V bitops.h
- Zihintpause:
On a system that doesn't have this extension, cpu_relax() should be
implemented properly.
- SVPBMT is mandatory to enable changing the memory attributes of a page.
For platforms that do not support SVPBMT, it is necessary to introduce a
similar mechanism as described in:
https://lore.kernel.org/all/20241102000843.1301099-1-samuel.holland@sifive.com/