From nobody Fri Oct 31 23:24:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) ARC-Seal: i=2; a=rsa-sha256; t=1745100704; cv=pass; d=zohomail.com; s=zohoarc; b=mKHgco74HWlbYXRgrT07WVD/M0XMeQdrxXS17ddJ2TQhz0WPjHD1BI86In8V/CYlLLAO4EKqGnp9W8zdeO/+tEsINh5a9+bg43CzPoatPs2VXlBPxLSG6A+P9O/rXCpZLgc7C7kz4zvyoaSiIGsnXKP5yAV+d+JQkK9cUl8iZsI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745100704; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=joeZ5CWNCE6Z2Un/cJIOF/EP6nfinf+YaJF/l3mCceo=; b=MjwhGcbaTCMM1u1vV2TSsVY2ZGGBDbK25xNRhH36W166FKk0zERCpnXTJVnbcYdyWCnRFXFLu1rg6MRcM02nhiDwc0PfwROBZPMsVnGxPlF/uCpmcaDT8yw82BevBp2MddwBM8keU+TyH7ATX+0r+WVLDFG9e5P7vjExSqdH48o= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745100704605312.9161982803073; Sat, 19 Apr 2025 15:11:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.960066.1352183 (Exim 4.92) (envelope-from ) id 1u6GOg-00020I-Sp; Sat, 19 Apr 2025 22:10:50 +0000 Received: by outflank-mailman (output) from mailman id 960066.1352183; Sat, 19 Apr 2025 22:10:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u6GOg-000201-NT; Sat, 19 Apr 2025 22:10:50 +0000 Received: by outflank-mailman (input) for mailman id 960066; Sat, 19 Apr 2025 22:10:48 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u6GNN-0004ik-Oj for xen-devel@lists.xenproject.org; Sat, 19 Apr 2025 22:09:29 +0000 Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f48916eb-1d6a-11f0-9ffb-bf95429c2676; Sun, 20 Apr 2025 00:09:26 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1745100514143191.97463134767452; Sat, 19 Apr 2025 15:08:34 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f48916eb-1d6a-11f0-9ffb-bf95429c2676 ARC-Seal: i=1; a=rsa-sha256; t=1745100516; cv=none; d=zohomail.com; s=zohoarc; b=EnLesCv4QdHgS2G5laY0Pexlzv+GIkpcoOLjJ/mfBaFaA5Avm/8t04M/xMfrP9N4525LY9UDsy/knSSE7RHpYD12fl53fL3PFwjtoXdHk28J+PO+p0MI8bnWzMGRPhKI66cLqZ/F/UeP9teKYXYRyDRTfME2tYhu1EyuDPKL9ls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745100516; 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=joeZ5CWNCE6Z2Un/cJIOF/EP6nfinf+YaJF/l3mCceo=; b=b6si5+cb73AugZitj+DILLZn4LOtZhVhoJSfqiJ8d3ugzsNecqa65SI9EbEwStYCKfu/jBF7+aIZaDZZwjlw/dByGFdYzwsJEWCo1OtLmObPfUqyDCc5feug/JQacpaF/AcLG2XKD73bPozCZkM+OUtfglAhYBpkcHZ4pdvSLrg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1745100516; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=joeZ5CWNCE6Z2Un/cJIOF/EP6nfinf+YaJF/l3mCceo=; b=jwe/gSb1XnvZG0Pyu6cJi03zm/soy673yJ4TTvVGXRW7YP/J0nPzWhfFNzrTB5mK Qk/wzD5uq8u6DtPxq9/3HE77iq30UMOEmzRtg5FzVvdQfOh22vs4Hwic5MvInReNVjp SAiJ/0mVdL9gOpgwV6oI2r9nHK2OYWWFk9dkqbGM= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , jason.andryuk@amd.com, stefano.stabellini@amd.com, agarciav@amd.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [RFC 05/38] x86/hyperlaunch: move dom0 cpuid policy behind capability check Date: Sat, 19 Apr 2025 18:07:47 -0400 Message-Id: <20250419220820.4234-6-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250419220820.4234-1-dpsmith@apertussolutions.com> References: <20250419220820.4234-1-dpsmith@apertussolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-ZohoMail-DKIM: pass (identity dpsmith@apertussolutions.com) X-ZM-MESSAGEID: 1745100705610019000 Content-Type: text/plain; charset="utf-8" To incrementally convert create_dom0() into being a generalized domain construction function, move the dom0 specific cpuid policy behind the contr= ol domain capability. Signed-off-by: Daniel P. Smith --- 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 8ba9d592ed5a..41e46f05a520 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1050,7 +1050,8 @@ static struct domain *__init create_dom0(struct boot_= info *bi) =20 bd->d =3D d; =20 - init_dom0_cpuid_policy(d); + if ( bd->capabilities & BUILD_CAPS_CONTROL ) + init_dom0_cpuid_policy(bd->d); =20 if ( alloc_dom_vcpu0(bd) =3D=3D NULL ) panic("Error creating %pd vcpu 0\n", d); --=20 2.30.2