From: Jan Beulich <jbeulich@suse.com>
To: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Cc: "Romain Caritey" <Romain.Caritey@microchip.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 04/23] xen/riscv: Implement construct_domain()
Date: Wed, 17 Jun 2026 13:26:48 +0200 [thread overview]
Message-ID: <cd91fa75-435b-4100-8932-99f3da5523a7@suse.com> (raw)
In-Reply-To: <db630a8a003a1aa69e4edaf6d5f4994f18ac1354.1781693963.git.oleksii.kurochko@gmail.com>
On 17.06.2026 13:17, Oleksii Kurochko wrote:
> Implement construct_domain() function for RISC-V, which performs initial setup
> for the domain's first vCPU, loads the kernel, initrd, and device tree,
> and sets up guest CPU registers for boot.
>
> It also creates additional vCPUs up to max_vcpus and assigns the device tree
> address and boot cpuid in registers.
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
> Changes in v3:
> - s/%d/%u for printing vCPU index in the failure message.
> - Drop dprintk() for successful vCPU creation.
My
Acked-by: Jan Beulich <jbeulich@suse.com>
was lost, however. One more remark:
> --- /dev/null
> +++ b/xen/arch/riscv/domain-build.c
> @@ -0,0 +1,50 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +
> +#include <xen/fdt-domain-build.h>
> +#include <xen/fdt-kernel.h>
> +#include <xen/init.h>
> +#include <xen/sched.h>
> +
> +#include <asm/current.h>
> +#include <asm/guest_access.h>
> +
> +int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
> +{
> + struct vcpu *v = d->vcpu[0];
> + struct cpu_user_regs *regs = vcpu_guest_cpu_user_regs(v);
> +
> + BUG_ON(v->is_initialised);
> +
> + /*
> + * At the moment *_load() don't return value and will just panic()
> + * inside.
> + * TODO: it will be good to change that.
> + */
> + kernel_load(kinfo);
> + initrd_load(kinfo, copy_to_guest_phys);
> + dtb_load(kinfo, copy_to_guest_phys);
> +
> + regs->sepc = kinfo->entry;
> +
> + /* Guest boot cpuid = 0 */
> + regs->a0 = 0;
> + regs->a1 = kinfo->dtb_paddr;
> +
> + for ( unsigned int i = 1; i < d->max_vcpus; i++ )
> + {
> + const struct vcpu *tmp_v = vcpu_create(d, i);
> +
> + if ( !tmp_v )
> + {
> + printk("Failed to allocate %pd v%u\n", d, i);
If you dropped the blank before v%u, the output would match that of %pv
(improving the chances of people actually spotting that the exact same
thing is meant). Once again - can do the adjustment while committing,
provided you agree (and provided earlier patches gain the necessary
acks).
Jan
next prev parent reply other threads:[~2026-06-17 11:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 11:17 [PATCH v3 00/23] Introduce enablemenant of dom0less Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 01/23] xen: arm: move declaration of map_device_irqs_to_domain() to common header Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 02/23] xen: arm: update p2m_set_allocation() prototype Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 03/23] xen/riscv: Implement ARCH_PAGING_MEMPOOL Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 04/23] xen/riscv: Implement construct_domain() Oleksii Kurochko
2026-06-17 11:26 ` Jan Beulich [this message]
2026-06-17 11:48 ` Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 05/23] xen/riscv: implement prerequisites for domain_create() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 06/23] xen/riscv: introduce guest riscv,isa string Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 07/23] xen/riscv: implement make_cpus_node() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 08/23] xen/riscv: implement make_timer_node() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 09/23] xen/riscv: implement make_arch_nodes() Oleksii Kurochko
2026-06-17 11:30 ` Jan Beulich
2026-06-17 11:49 ` Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 10/23] xen/riscv: introduce init interrupt controller operations Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 11/23] xen/riscv: implement make_intc_domU_node() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 12/23] xen/riscv: introduce aia_init() and aia_usable() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 13/23] xen/riscv: introduce per-vCPU IMSIC state Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 14/23] xen/riscv: add very early virtual APLIC (vAPLIC) initialization support Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 15/23] xen/riscv: introduce (de)initialization helpers for vINTC Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 16/23] xen/riscv: generate IMSIC DT node for guest domains Oleksii Kurochko
2026-06-17 11:24 ` Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 17/23] xen/riscv: create APLIC " Oleksii Kurochko
2026-06-17 11:24 ` Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 18/23] xen/riscv: implement IRQ routing for device passthrough Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 19/23] xen/riscv: implement init_intc_phandle() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 20/23] xen/riscv: initialize RCU, scheduler, and system domains in start_xen() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 21/23] xen/riscv: provide init_vuart() Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 22/23] xen/Kconfig: introduce HAS_STATIC_MEMORY Oleksii Kurochko
2026-06-17 11:17 ` [PATCH v3 23/23] xen/riscv: add initial dom0less infrastructure support Oleksii Kurochko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd91fa75-435b-4100-8932-99f3da5523a7@suse.com \
--to=jbeulich@suse.com \
--cc=Romain.Caritey@microchip.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=connojdavis@gmail.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.