On 10/8/24 15:48, Jason Andryuk wrote:
On 2024-10-06 17:49, Daniel P. Smith wrote:
Store a reference to the created domain in struct boot_domain.

Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
---

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index f250638edf09..e6a231bd2d42 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -959,7 +959,6 @@ static struct domain *__init create_dom0(struct boot_info *bi)
          },
      };
      struct boot_domain *bd = &bi->domains[0];
-    struct domain *d;
      if ( opt_dom0_pvh )
      {
@@ -976,13 +975,13 @@ static struct domain *__init create_dom0(struct boot_info *bi)
      /* Create initial domain.  Not d0 for pvshim. */
      bd->domid = get_initial_domain_id();
-    d = domain_create(bd->domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged);

It's a smaller patch if you keep `d` and the line above and then do:
        bd->d = d;

Yah, this can be done.

v/r,
dps

Reply via email to