From patchwork Fri Oct 15 16:51:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bertrand Marquis X-Patchwork-Id: 12562545 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 7D7D8C4332F for ; Fri, 15 Oct 2021 16:52:16 +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 4BAEA60F11 for ; Fri, 15 Oct 2021 16:52:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4BAEA60F11 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.210927.367986 (Exim 4.92) (envelope-from ) id 1mbQRF-0005sE-3N; Fri, 15 Oct 2021 16:52:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 210927.367986; Fri, 15 Oct 2021 16:52:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbQRF-0005ry-01; Fri, 15 Oct 2021 16:52:09 +0000 Received: by outflank-mailman (input) for mailman id 210927; Fri, 15 Oct 2021 16:52:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbQRD-00052U-8l for xen-devel@lists.xenproject.org; Fri, 15 Oct 2021 16:52:07 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 4f640820-d165-4558-baf3-88a3163207e8; Fri, 15 Oct 2021 16:52:04 +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 3D8531480; Fri, 15 Oct 2021 09:52:04 -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 3D9C23F70D; Fri, 15 Oct 2021 09:52:03 -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: 4f640820-d165-4558-baf3-88a3163207e8 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 3/5] tools/libxl: Modify libxl__arch_domain_init_hw_description... Date: Fri, 15 Oct 2021 17:51:43 +0100 Message-Id: <9f08e64663ac0815fa19f7fdc8e38b1b94dd347d.1634315461.git.bertrand.marquis@arm.com> 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*. We need to pass the whole libxl_domain_config structure as this will be needed later on to modify the libxl__prepare_dtb function to also take libxl_domain_config. 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_arch.h | 2 +- tools/libs/light/libxl_arm.c | 3 ++- tools/libs/light/libxl_dom.c | 2 +- tools/libs/light/libxl_x86.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/libs/light/libxl_arch.h b/tools/libs/light/libxl_arch.h index 8527fc5c6c..1522ecb97f 100644 --- a/tools/libs/light/libxl_arch.h +++ b/tools/libs/light/libxl_arch.h @@ -38,7 +38,7 @@ int libxl__arch_domain_create(libxl__gc *gc, /* setup arch specific hardware description, i.e. DTB on ARM */ _hidden int libxl__arch_domain_init_hw_description(libxl__gc *gc, - libxl_domain_build_info *info, + libxl_domain_config *d_config, libxl__domain_build_state *state, struct xc_dom_image *dom); /* finalize arch specific hardware description. */ diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c index a7801558cf..d5771f98dd 100644 --- a/tools/libs/light/libxl_arm.c +++ b/tools/libs/light/libxl_arm.c @@ -1016,12 +1016,13 @@ out: } int libxl__arch_domain_init_hw_description(libxl__gc *gc, - libxl_domain_build_info *info, + libxl_domain_config *d_config, libxl__domain_build_state *state, struct xc_dom_image *dom) { int rc; uint64_t val; + libxl_domain_build_info *const info = &d_config->b_info; if (info->type != LIBXL_DOMAIN_TYPE_PVH) { LOG(ERROR, "Unsupported Arm guest type %s", diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index e9f58ee4b2..fe9f760f71 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -571,7 +571,7 @@ static int libxl__build_dom(libxl__gc *gc, uint32_t domid, LOG(ERROR, "xc_dom_parse_image failed"); goto out; } - if ( (ret = libxl__arch_domain_init_hw_description(gc, info, state, dom)) != 0 ) { + if ( (ret = libxl__arch_domain_init_hw_description(gc, d_config, state, dom)) != 0 ) { LOGE(ERROR, "libxl__arch_domain_init_hw_description failed"); goto out; } diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c index 6083878315..1feadebb18 100644 --- a/tools/libs/light/libxl_x86.c +++ b/tools/libs/light/libxl_x86.c @@ -568,7 +568,7 @@ int libxl__arch_extra_memory(libxl__gc *gc, } int libxl__arch_domain_init_hw_description(libxl__gc *gc, - libxl_domain_build_info *info, + libxl_domain_config *d_config, libxl__domain_build_state *state, struct xc_dom_image *dom) {