|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] docs/riscv: sync required ISA extensions with required_extensions[]
commit 469d83d42f5cd3c892ed845d01828f817158f114
Author: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Wed Sep 30 08:49:51 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 30 08:49:51 2026 +0200
docs/riscv: sync required ISA extensions with required_extensions[]
booting.txt listed only H, Zbb, Zihintpause and Svpbmt as required, while
required_extensions[] in cpufeature.c also checks for I, M, A, Zicsr,
Zifencei and, with CONFIG_RISCV_ISA_C=y, C. As the panic message printed
for a missing extension points to booting.txt, document the missing ones.
Also add a section pointing to riscv_isa_ext[] for the optional extensions
Xen recognises, and a comment above required_extensions[] to keep it in
sync with the document.
No functional change.
Suggested-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Signed-off-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
docs/misc/riscv/booting.txt | 24 ++++++++++++++++++++----
xen/arch/riscv/cpufeature.c | 1 +
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/docs/misc/riscv/booting.txt b/docs/misc/riscv/booting.txt
index e100bde575..c99ccafa74 100644
--- a/docs/misc/riscv/booting.txt
+++ b/docs/misc/riscv/booting.txt
@@ -1,8 +1,12 @@
System requirements
===================
-The following extensions are expected to be supported by a system on which
-Xen is run:
+The following extensions are required by Xen. Xen panics at boot if any of
+them is missing from the riscv,isa property of the CPU nodes:
+- I, M, A, Zicsr, Zifencei:
+ Base ISA Xen is compiled for.
+- C:
+ Required only when Xen is built with CONFIG_RISCV_ISA_C=y.
- H:
Provides additional instructions and CSRs that control the new stage of
address translation and support hosting a guest OS in virtual S-mode
@@ -18,7 +22,19 @@ Xen is run:
- 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
+- Svpbmt:
+ 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@xxxxxxxxxx/
+
+Note: this list must be kept in sync with required_extensions[] in
+ xen/arch/riscv/cpufeature.c.
+
+Optional extensions
+===================
+
+Other extensions recognised by Xen are listed in riscv_isa_ext[] in
+xen/arch/riscv/cpufeature.c. Xen uses them when present, but they are not
+needed to boot. The second column of that table says whether the extension
+is also exposed to guests.
diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index aaf544d13f..2d12dffae7 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -203,6 +203,7 @@ static const struct riscv_isa_ext_entry __initconstrel
riscv_isa_ext[] = {
RISCV_ISA_EXT_ENTRY(svpbmt, NONE),
};
+/* Keep in sync with docs/misc/riscv/booting.txt. */
static const struct riscv_isa_ext_data __initconst required_extensions[] = {
RISCV_ISA_EXT_DATA(i),
RISCV_ISA_EXT_DATA(m),
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |