From patchwork Fri Oct 15 16:51:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bertrand Marquis X-Patchwork-Id: 12562547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A99AC433F5 for ; Fri, 15 Oct 2021 16:52:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 370AC60FDA for ; Fri, 15 Oct 2021 16:52:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 370AC60FDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.210928.367996 (Exim 4.92) (envelope-from ) id 1mbQRK-0006IV-EZ; Fri, 15 Oct 2021 16:52:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 210928.367996; Fri, 15 Oct 2021 16:52:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbQRK-0006IK-Af; Fri, 15 Oct 2021 16:52:14 +0000 Received: by outflank-mailman (input) for mailman id 210928; Fri, 15 Oct 2021 16:52:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbQRI-00052U-8z for xen-devel@lists.xenproject.org; Fri, 15 Oct 2021 16:52:12 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 35367cef-0b68-4c69-a303-855dfb9fc1b6; Fri, 15 Oct 2021 16:52:05 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7214511D4; Fri, 15 Oct 2021 09:52:05 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 710F73F70D; Fri, 15 Oct 2021 09:52:04 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 35367cef-0b68-4c69-a303-855dfb9fc1b6 From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: iwj@xenproject.org, sstabellini@kernel.org, Michal Orzel , Wei Liu , Anthony PERARD , Juergen Gross Subject: [PATCH v8 4/5] tools/libxl_arm: Modify libxl__prepare_dtb... Date: Fri, 15 Oct 2021 17:51:44 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 From: Michal Orzel ... to take a second argument of type libxl_domain_config* rather than libxl_domain_build_info*. This change will be needed to get access from libxl__prepare_dtb to "num_pcidevs" field of libxl_domain_config to check whether to create a vPCI DT node or not. Signed-off-by: Michal Orzel Signed-off-by: Bertrand Marquis Suggested-by: Ian Jackson Reviewed-by: Ian Jackson --- Changes in v8: add Signed-off Bertrand Marquis Changes in v7: Patch added --- tools/libs/light/libxl_arm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c index d5771f98dd..fdae129605 100644 --- a/tools/libs/light/libxl_arm.c +++ b/tools/libs/light/libxl_arm.c @@ -878,7 +878,7 @@ static int copy_partial_fdt(libxl__gc *gc, void *fdt, void *pfdt) #define FDT_MAX_SIZE (1<<20) -static int libxl__prepare_dtb(libxl__gc *gc, libxl_domain_build_info *info, +static int libxl__prepare_dtb(libxl__gc *gc, libxl_domain_config *d_config, libxl__domain_build_state *state, struct xc_dom_image *dom) { @@ -887,6 +887,7 @@ static int libxl__prepare_dtb(libxl__gc *gc, libxl_domain_build_info *info, int rc, res; size_t fdt_size = 0; int pfdt_size = 0; + libxl_domain_build_info *const info = &d_config->b_info; const libxl_version_info *vers; const struct arch_info *ainfo; @@ -1042,7 +1043,7 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc, if (rc) return rc; - rc = libxl__prepare_dtb(gc, info, state, dom); + rc = libxl__prepare_dtb(gc, d_config, state, dom); if (rc) goto out; if (!libxl_defbool_val(info->acpi)) {