[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 2/3] xen/dom0less: pass kernel_info struct instead of fdt to make_cpus_node()


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 20 Apr 2026 09:29:41 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oEGRxzNeGZqB8YZt0n2/T7bjh3hrYyF/Nm/QHv0KEOE=; b=d5MKmtiWslx23YHFZPwapGYdcGmT2ijkGvpjRO9vbcRVaJ7H93dOzvVMvk8OK5Q/PzsmSm6tezBuKiZzuhC+l7NLs9TI3r8COBdOkdB+Tcyfv5TsOoADRyNIJ7s+/92ufZPExIER5heYnk35qFCQJg3vw4XYNiciILnVzcDoXSy3SllYCeJcx49iQ2XkoflZqJKahigQ4YJ+aTbNtC6rwzJchNC/lxtqqw/pNkHzVmAoRyBefkHq3tKlCdL6HY+FtCfxt69NqmldrQ2ju6vAeAc6UQVIAYHV/akUcCC626Kvfi/cDrTxKtIbpbBimDnxS0Jl6F5MHGS93M+uWnnaeg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E56Vt33SnUFM8KCgyHA1/0pLTE4a3SPRaGataScMOTUsY2CFUK7NTXr6LV2t3nInXhLPNdKf87XUQNbFyg3g5y4Is2RMBYbHd2vaU+3N9eRcOjRXhjcDN1Yde51mfbW8ZrraMZjZTZJjPE7b4ewpt5bOPogR+O6BTHtheUBfvkNNYviG9Pwz85DTDSkdZUT/y1OKyQuClGUCCGZUfHz2ZZRwdJd35SjhXWQiXuuDml688a/8qCnGrOAoGbzzA+8R6c+uErxQ0gxjM+PS+DgyVDmoe/hJIlMghy48kdbUCpay/dByS8JNwd6HQ2ayvlAs39mx7RQA/2n34PJ0f1yXEw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 20 Apr 2026 07:29:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 16/04/2026 16:20, Oleksii Kurochko wrote:
> There are two reasons of this change:
> 1. Align prototype with what other make_*_node() are passed.
> 2. A follow-up RISC-V patch will call get_next_free_phandle() inside
>    make_cpus_node(), requiring mutable access to kinfo->free_phandle.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> ---
>  xen/arch/arm/domain_build.c             | 5 +++--
>  xen/common/device-tree/dom0less-build.c | 2 +-
>  xen/include/xen/fdt-domain-build.h      | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 60a7cbf915a5..6740da3d324b 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1164,7 +1164,7 @@ int __init make_psci_node(void *fdt)
>      return res;
>  }
>  
> -int __init make_cpus_node(const struct domain *d, void *fdt)
> +int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
>  {
>      int res;
>      const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
> @@ -1178,6 +1178,7 @@ int __init make_cpus_node(const struct domain *d, void 
> *fdt)
>      /* Keep the compiler happy with -Og */
>      bool clock_valid = false;
>      uint64_t mpidr_aff;
> +    void *fdt = kinfo;
You're assigning kinfo to fdt pointer which is a bug.
Instead, you should do:
void *fdt = kinfo->fdt

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.