[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86: Conditionalise init_dom0_cpu_policy()
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Thu, 17 Jul 2025 19:58:24 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=qhfgqZFxhBQUxe6MEUp1EoFDlX8/aCZ1Wd8+wIymjJw=; b=yYsh2hMvO24eTrbFbSb1XskLVlhcTs4sOYvFvo3hL8g3w18+Sr+S5BUsotG6PJlSJVM69dACFt7ysyYMoTmalx0p8Y4G9rPjmc5YjwxIyjaozo1SuJdA4E2En2B7UkBJM9p+P4+0B3aZGVfFW38kqLqgTlwbVOK0USk+bXJP/JtJMxm3hVwufIebfjWzkcBOhQqLqg5VMNY5VEanVYGKqqY26JJMl52XoC5wk7Rwz/q27alory7UT5Mn9fN5BChjmoChxCahS1qCPkfyi9uK9XibZ8ZI3XnXvVXuJj3f1VXt2P8kW7I/76Q4KllK0GxUQlKDFdHlN54TgzuaUVXq+Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tCiarkpcreKldVgAfoaQNZ1ZpMC3mPtnwhD5ZZf9mE6+2sRmfolpZg+vOsl5gg7uctJjwkpf8hTiVI97DZPP5Qpfslmyysxq4Vhd386mBw5jahmjsl/GO+bdRepMefDZakzCSuNNZL6hW9EOCC6ZBneoCdbThVj6u6hvnmGbfH2ON17NVpd3hDO/aAw7t2sViAeIC2VU/ZEfqTOK3en56p2W+RyZGrUONTtz5vqICnCe1fbnojIFdUEfqHuoM0cBx/1ydu5D5ekzbwdxosi8It7eANvn0dXrnUMeiiWw2WvOugnZbjkGAE+mILwfyklCOK6pSDEHZ4u4d9Ud7T5wXw==
- Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 17 Jul 2025 17:58:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Later patches will keep refactoring create_dom0()
until it can create arbitrary domains. This is one
small step in that direction.
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
xen/arch/x86/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c6890669b9..6943ffba79 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1054,7 +1054,8 @@ static struct domain *__init create_dom0(struct boot_info
*bi)
if ( IS_ERR(d) )
panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d));
- init_dom0_cpuid_policy(d);
+ if ( pv_shim || d->cdf & (CDF_privileged | CDF_hardware) )
+ init_dom0_cpuid_policy(d);
if ( alloc_dom0_vcpu0(d) == NULL )
panic("Error creating %pdv0\n", d);
base-commit: 55719030b0bb0069fc8b57cd808dc98dc9d39add
--
2.43.0
|