|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 1/2] 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.
Fixes: f74ebf58b518 ("xen/riscv: identify specific ISA supported by cpu")
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
xen/arch/riscv/cpufeature.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index dff590f68a30..c4983ccdf3da 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -477,6 +477,13 @@ static void __init riscv_fill_hwcap_from_isa_string(void)
if ( !dt_device_type_is_equal(cpu, "cpu") )
continue;
+ /*
+ * A disabled hart is never used by Xen, so it must not restrict
+ * the set of extensions available to it.
+ */
+ if ( !dt_device_is_available(cpu) )
+ continue;
+
if ( dt_get_cpuid_from_node(cpu, &cpuid) < 0 )
continue;
--
2.56.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |