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

[RFC 05/38] x86/hyperlaunch: move dom0 cpuid policy behind capability check


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 19 Apr 2025 18:07:47 -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=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-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=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, jason.andryuk@xxxxxxx, stefano.stabellini@xxxxxxx, agarciav@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sat, 19 Apr 2025 22:10:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

To incrementally convert create_dom0() into being a generalized domain
construction function, move the dom0 specific cpuid policy behind the control
domain capability.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
 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)
 
     bd->d = d;
 
-    init_dom0_cpuid_policy(d);
+    if ( bd->capabilities & BUILD_CAPS_CONTROL )
+        init_dom0_cpuid_policy(bd->d);
 
     if ( alloc_dom_vcpu0(bd) == NULL )
         panic("Error creating %pd vcpu 0\n", d);
-- 
2.30.2




 


Rackspace

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