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

[PATCH v7 35/38] x86/boot: add struct domain to struct boot_domain


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 20 Oct 2024 20:46:10 -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=1729471626; 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=SP/LZEnrjEkSEMtxaAJe6x6uyzbbJYUTQUInZxcjnQE=; b=ZC/Ja/iy4CecbkMHRdrE8sPL2DerYU8qTnccbOlu7f7mF06+0lOUqrGpBgt71Z4u3qNoS4iD5GDIaXe5D6RNkmd6ZGHrX68yGtglO2Lo5hS/SAN9Z8XNVhLud5tDzpYiJEjP3EqTcsH8vNK3zSb18kT7b5nJLRiLGS9PDG+iTd4=
  • Arc-seal: i=1; a=rsa-sha256; t=1729471626; cv=none; d=zohomail.com; s=zohoarc; b=i30lf8G+k/jQfGtNSeGKOCqI68IMmUoWwWcBaXzwK2jtXy6qKxgotbJp8GcH3YILB/znM2CpC5fhWAIOCjWix0yGhDC1nn3SDjBJL9NoK6mPS4tODrn1oaORhYFNLOr+Wbf/jKC/xOxQFick1LEOx8jQw4iBHuAb4agLj/m4Ctg=
  • 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>

Store a reference to the created domain in struct boot_domain.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
Changes since v5:
- moved back to using variable *d to hold domain reference locally
---
 xen/arch/x86/include/asm/bootdomain.h | 3 +++
 xen/arch/x86/setup.c                  | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/bootdomain.h 
b/xen/arch/x86/include/asm/bootdomain.h
index 00f7d9267965..2322c459e36a 100644
--- a/xen/arch/x86/include/asm/bootdomain.h
+++ b/xen/arch/x86/include/asm/bootdomain.h
@@ -10,6 +10,7 @@
 
 #include <public/xen.h>
 
+struct domain;
 struct boot_module;
 
 struct boot_domain {
@@ -19,6 +20,8 @@ struct boot_domain {
 
     struct boot_module *kernel;
     struct boot_module *ramdisk;
+
+    struct domain *d;
 };
 
 #endif
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 47b705097dd3..9423e999990a 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1028,10 +1028,12 @@ static struct domain *__init create_dom0(struct 
boot_info *bi)
         }
     }
 
+    bd->d = d;
+
     if ( construct_dom0(d, bd->kernel, bd->ramdisk, bd->cmdline) != 0 )
         panic("Could not construct domain 0\n");
 
-    return d;
+    return bd->d;
 }
 
 /* How much of the directmap is prebuilt at compile time. */
-- 
2.30.2




 


Rackspace

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