[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 41/44] x86/boot: add struct domain to struct boot_domain
- To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 8 Oct 2024 15:48:20 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/g3dcwdHby4ZdYU/WA4WKgagK1TAEoysiyWn+YMwo+I=; b=MztKPXbhptnpO3hgN3KdUpAwKLJhLYA6dzEmpZpKCGcTyOIxukk7mfWMnbiYaofrIXWdRaaqFeHzR33+8vBy+J4tECWPY4BTjrW5g+O+EVJN/Q+8VChQQ8BOpBwybH5Yn6HRSdCYJ9hRnN0YvmYrIvP0JzOzhmhws59UqOdh32mS05R/bnQE9+0P0J18y9udTKL7FE/Ore99wGXRTFePl7lpx0f4zELh16oQZiLW+MvhZZW6px3DUp6R1TIIInr4oaGLWdxC2tJcGxf3p5k9Q7sjNHtmKoSBj2smr8EYfWLonPYNiN3l+0n7jZg32snK11Y5gcYx1fV3RKVGv4MoGg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=krEIg6NcTCoE+Fqk2JixqHkL+DWrtqNmpi/CqJWebnyku90g18Q3CWlpJRwPuRnFK9gCA5IJPfC9/QRwGmdcN7SHtte5LG72w0yJDBkKx/ygIrNmDboShRliU84p3VT0SWx+v7oi66lYzVeJtwmlbYD5GStRlU+0wRL4I/io/Q1eKqRV4x3xPF8GkiDCDjGVnS5pBRZiPGq3gPWc0OxVLXYHyVNsYWhSGY9I7pf9LQPNDIANnr7hxIAERBcrYnWYWYDUIe73mr0aDdB0Unf6h2zM0l6YHzSL1bma84aCow78gDU8TDsp319kQc8r+CjUHyzi9NsxmHdC2jVbxYp//g==
- Cc: <christopher.w.clark@xxxxxxxxx>, <stefano.stabellini@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 08 Oct 2024 20:49:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
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;
Regards,
Jason
- if ( IS_ERR(d) )
- panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d));
+ bd->d = domain_create(bd->domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged);
+ if ( IS_ERR(bd->d) )
+ panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(bd->d));
- init_dom0_cpuid_policy(d);
+ init_dom0_cpuid_policy(bd->d);
- if ( alloc_dom0_vcpu0(d) == NULL )
+ if ( alloc_dom0_vcpu0(bd->d) == NULL )
panic("Error creating d%uv0\n", bd->domid);
/* Grab the DOM0 command line. */
|