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

[PATCH v7 38/38] x86/boot: convert dom0_construct_pvh to struct boot_domain


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 20 Oct 2024 20:46:13 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729471630; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=aNiN7YZD1SazmqTlmBUizZzq3LQ/OZULOiAYxfKrfPs=; b=cClLXdwR2izAtMgWydaL8WXbRd943bZGgq1Jubtuoog+ln9tjiBEltcE6tDNXiHTgJpNlr0OJwog8b/N8qOHYGB3I15wAr+O+xl7Wr2cC1LseSyTzruRKdMxP+a0/N1SXVANs8YwlinIgAUEn2WWohdwChRo0RAMtqcJ+Za7dyU=
  • Arc-seal: i=1; a=rsa-sha256; t=1729471630; cv=none; d=zohomail.com; s=zohoarc; b=DBpP/etX40b9X02XsY3EwrRHnOnn1TQzVdf233CEGfo6hf/HkjM+08haoVCXvTxSkuVdjQMRUZhChx3xDGieYgOFJv3ue5fD4iDRIda1e31w9597CFrmqsUGvxOtI1+1/YQ6p/zKf1Fg4tXEj6k2wRzVGVhGbPp4qorLmAEUlY4=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 21 Oct 2024 00:56:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

With construct_dom0 consuming struct boot_domain, continue passing the
structure down to dom0_construct_pvh.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
Changes since v5:
- revert back to using *d as local reference for struct domain
---
 xen/arch/x86/dom0_build.c             | 2 +-
 xen/arch/x86/hvm/dom0_build.c         | 8 ++++----
 xen/arch/x86/include/asm/dom0_build.h | 4 +---
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 96cd1154b037..f0d2c349095b 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -610,7 +610,7 @@ int __init construct_dom0(struct boot_domain *bd)
     process_pending_softirqs();
 
     if ( is_hvm_domain(d) )
-        rc = dom0_construct_pvh(bd->d, bd->kernel, bd->ramdisk, bd->cmdline);
+        rc = dom0_construct_pvh(bd);
     else if ( is_pv_domain(d) )
         rc = dom0_construct_pv(bd);
     else
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 211f4e3e772e..720e08f9346f 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -1299,10 +1299,9 @@ static void __hwdom_init pvh_setup_mmcfg(struct domain 
*d)
     }
 }
 
-int __init dom0_construct_pvh(struct domain *d, const struct boot_module 
*image,
-                              struct boot_module *initrd,
-                              const char *cmdline)
+int __init dom0_construct_pvh(const struct boot_domain *bd)
 {
+    struct domain *d = bd->d;
     paddr_t entry, start_info;
     int rc;
 
@@ -1345,7 +1344,8 @@ int __init dom0_construct_pvh(struct domain *d, const 
struct boot_module *image,
         return rc;
     }
 
-    rc = pvh_load_kernel(d, image, initrd, bootstrap_map_bm(image), cmdline,
+    rc = pvh_load_kernel(d, bd->kernel, bd->ramdisk,
+                         bootstrap_map_bm(bd->kernel), bd->cmdline,
                          &entry, &start_info);
     if ( rc )
     {
diff --git a/xen/arch/x86/include/asm/dom0_build.h 
b/xen/arch/x86/include/asm/dom0_build.h
index eafa741db16f..adbe90bfd034 100644
--- a/xen/arch/x86/include/asm/dom0_build.h
+++ b/xen/arch/x86/include/asm/dom0_build.h
@@ -16,9 +16,7 @@ int dom0_setup_permissions(struct domain *d);
 
 int dom0_construct_pv(struct boot_domain *bd);
 
-int dom0_construct_pvh(struct domain *d, const struct boot_module *image,
-                       struct boot_module *initrd,
-                       const char *cmdline);
+int dom0_construct_pvh(const struct boot_domain *bd);
 
 unsigned long dom0_paging_pages(const struct domain *d,
                                 unsigned long nr_pages);
-- 
2.30.2




 


Rackspace

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