[PATCH v1 08/27] xen/riscv: implement make_arch_nodes()

Oleksii Kurochko posted 27 patches 4 weeks ago
[PATCH v1 08/27] xen/riscv: implement make_arch_nodes()
Posted by Oleksii Kurochko 4 weeks ago
No RISC-V-specific nodes need to be created at the moment,
so make_arch_nodes() is implemented to simply return 0.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/Makefile         |  1 +
 xen/arch/riscv/dom0less-build.c | 11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 xen/arch/riscv/dom0less-build.c

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 6c6c58ed1ac0..fb04cc5a56b2 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,5 +1,6 @@
 obj-y += aplic.o
 obj-y += cpufeature.o
+obj-y += dom0less-build.o
 obj-y += domain.o
 obj-y += domain-build.o
 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
diff --git a/xen/arch/riscv/dom0less-build.c b/xen/arch/riscv/dom0less-build.c
new file mode 100644
index 000000000000..10863cffc96b
--- /dev/null
+++ b/xen/arch/riscv/dom0less-build.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/fdt-kernel.h>
+#include <xen/init.h>
+
+int __init make_arch_nodes(struct kernel_info *kinfo)
+{
+    /* No RISC-V specific nodes need to be made, at the moment. */
+
+    return 0;
+}
-- 
2.53.0
Re: [PATCH v1 08/27] xen/riscv: implement make_arch_nodes()
Posted by Jan Beulich 6 days, 12 hours ago
On 10.03.2026 18:08, Oleksii Kurochko wrote:
> No RISC-V-specific nodes need to be created at the moment,
> so make_arch_nodes() is implemented to simply return 0.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Same question as on the previous patch, albeit to a lesser degree: An
arch hook may plausibly exist (and be called) uniformly, even if on
some arch-es it doesn't do anything.

> ---
>  xen/arch/riscv/Makefile         |  1 +
>  xen/arch/riscv/dom0less-build.c | 11 +++++++++++
>  2 files changed, 12 insertions(+)
>  create mode 100644 xen/arch/riscv/dom0less-build.c

Further, on what basis is this function put in this new file, when the
earlier ones live in domain-build.c?

> --- a/xen/arch/riscv/Makefile
> +++ b/xen/arch/riscv/Makefile
> @@ -1,5 +1,6 @@
>  obj-y += aplic.o
>  obj-y += cpufeature.o
> +obj-y += dom0less-build.o

obj-$(CONFIG_DOM0LESS_BOOT) += dom0less-build.init.o

just like Arm has it?

Jan