|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/riscv: skip disabled CPU nodes when probing ISA extensions
commit 01abf8a17d22e68c77aad40b35557dfeee02ee98
Author: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Thu Nov 12 09:22:11 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Nov 12 09:22:11 2026 +0100
xen/riscv: skip disabled CPU nodes when probing ISA extensions
riscv_fill_hwcap_from_isa_string() intersects the riscv,isa of every CPU
node under /cpus, including the ones with status = "disabled". Such a
hart is never used by Xen, yet it can still remove extensions from the
host ISA: e.g. a disabled hart without the H extension makes Xen panic
with "Xen requires extension: h", even though every hart Xen runs on
implements it.
Skip CPU nodes which aren't available, both there and in
has_isa_extensions_property(), so that the two agree on which harts are
taken into account.
Fixes: f74ebf58b518 ("xen/riscv: identify specific ISA supported by cpu")
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/riscv/cpufeature.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index 63f6883da0..b1c614867c 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -477,6 +477,9 @@ static void __init riscv_fill_hwcap_from_isa_string(void)
if ( !dt_device_type_is_equal(cpu, "cpu") )
continue;
+ if ( !dt_device_is_available(cpu) )
+ continue;
+
if ( dt_get_cpuid_from_node(cpu, &cpuid) < 0 )
continue;
@@ -519,6 +522,9 @@ static bool __init has_isa_extensions_property(void)
if ( !dt_device_type_is_equal(cpu, "cpu") )
continue;
+ if ( !dt_device_is_available(cpu) )
+ continue;
+
if ( dt_property_read_string(cpu, "riscv,isa-extensions", &isa) )
continue;
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |