From nobody Mon Apr 13 03:42:13 2026 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; 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=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1772654026; cv=pass; d=zohomail.com; s=zohoarc; b=KvutDqrCDH7Gkrp7gMA8F8JtRmCaHd3MHbkzoMdgwFyt185pU/wbIJM7BZ3Civw2a7KcStpWXgP9jgmUsLgcmlwZ+35Js66TSR8MKfqqy8xWd7iUIQgWcD2iSIreAMdkRzREX9VxjCORCF966kIpZZWQKfcMLgyE4s2x3ecyDFI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772654026; h=Content-Type: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=C8uSxdZ9apq9RNkJQVruOhBEhgTE/HpOqrFEHfxII2M=; b=OzA7v0SIbLm26x5u1zG1MSArWecXroQnqHjXkMTmi1AflgUKa3NHqhS5w9r6242LOYmNeKqb3iDsjWq2KuilfHPQr4ghHzkan1HuuiXHU8M03ZLs4WS67+GPLYV8CpXvv5Su2yci5hYMlE0rnUsXwl5F0JohAZ6fHX2YlkpDKu0= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; 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=citrix.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1772654026613478.72016355537994; Wed, 4 Mar 2026 11:53:46 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1245954.1545308 (Exim 4.92) (envelope-from ) id 1vxsHh-0000MO-MT; Wed, 04 Mar 2026 19:53:29 +0000 Received: by outflank-mailman (output) from mailman id 1245954.1545308; Wed, 04 Mar 2026 19:53:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vxsHh-0000MF-JF; Wed, 04 Mar 2026 19:53:29 +0000 Received: by outflank-mailman (input) for mailman id 1245954; Wed, 04 Mar 2026 19:53:28 +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 1vxsHf-0007ik-SJ for xen-devel@lists.xenproject.org; Wed, 04 Mar 2026 19:53:28 +0000 Received: from BN8PR05CU002.outbound.protection.outlook.com (mail-eastus2azlp170110003.outbound.protection.outlook.com [2a01:111:f403:c110::3]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ce6cf8b7-1803-11f1-9ccf-f158ae23cfc8; Wed, 04 Mar 2026 20:53:26 +0100 (CET) Received: from BY1PR03MB7996.namprd03.prod.outlook.com (2603:10b6:a03:5b2::8) by DM4PR03MB6079.namprd03.prod.outlook.com (2603:10b6:5:392::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Wed, 4 Mar 2026 19:53:24 +0000 Received: from BY1PR03MB7996.namprd03.prod.outlook.com ([fe80::5068:e1b5:b478:8d07]) by BY1PR03MB7996.namprd03.prod.outlook.com ([fe80::5068:e1b5:b478:8d07%5]) with mapi id 15.20.9678.016; Wed, 4 Mar 2026 19:53:24 +0000 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: ce6cf8b7-1803-11f1-9ccf-f158ae23cfc8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Z3wKQwBCJfiwGCPHf/5Hp/Hu6/AGsbeo7DlG4YonOGF9x0Me1HIgNGXL24/MoasdWjjCqUVatJrG/YoLFHwTqRMUmKl+0jxz8n8oJ60S0jIhaA+MPUSlc3EH/sI8Ov0yjgO0kD2uYj7+KmPfJPoav/NqsRxRpMHePhiRGMlZNcMqZPdMXgAJt+1Cvk4fRzw/M1SUsw3blWVog62lsdSAYo5iHWV5kmoeYVDqufxU9jjGj5eas3fHihHIPnM7SaBGKqmgmWJ6yO/lM8wDRrCyCyZJ0KCzAFfD3sRW23OAGtbW00rPPBiclLfK+omQoutxlY8rTsqDgskFpMJV6rjE8Q== 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=C8uSxdZ9apq9RNkJQVruOhBEhgTE/HpOqrFEHfxII2M=; b=w/WUJ5i4Ivr5Rizdq7JFTQtSN6prGVITq/dgrM0954Ay9AhzMmB6jovP+wb37QRmJn+vpgURuaFws9PATBQdW3QktFuCAxaRakS/TcVW0QQ+usAJMiwxoGHOcYvIQlR/f+rJVnI6Oa2lVZysNVQeRn9Fa1Trr7tJzZayRgb5AT1PpxIP8wmW7RY2bJoo7BzRBCtUMDoqJsAi0Tlu/HO0TbM2W5BJ9FI5PLTLw1TmbmcuP3iFTdb89WY+falxDqKWqtfP6k7VYhzWFqbkJ7zalHjnq3GzTwE8mCH0I7mFMBzlwIqlzH/Af8sX7yMbto+SQWuRKJdLI9xWy4sptklKKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C8uSxdZ9apq9RNkJQVruOhBEhgTE/HpOqrFEHfxII2M=; b=hIn1mYMS0uXI82zAM0lJX4GC9qAr+M1xjTpQWWSQN82jrCFuaaJGsmR0GXlywAuOtuqF9RHLLWj1vgBBBw5UVwjYy+gRWS1itaaC7G7JTywnlWshs3iv7nNCTgWfSmt44f1zriaOINPWDdUz7TGec1OWJQT6P6NkK0JgdQ0qtzM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Kevin Lampis To: xen-devel@lists.xenproject.org Cc: jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Kevin Lampis Subject: [PATCH 4/6] x86: Remove x86 prefixed names from x86/cpu/ files Date: Wed, 4 Mar 2026 19:53:48 +0000 Message-ID: <20260304195350.837593-5-kevin.lampis@citrix.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20260304195350.837593-1-kevin.lampis@citrix.com> References: <20260304195350.837593-1-kevin.lampis@citrix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: LO4P265CA0265.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37c::17) To BY1PR03MB7996.namprd03.prod.outlook.com (2603:10b6:a03:5b2::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR03MB7996:EE_|DM4PR03MB6079:EE_ X-MS-Office365-Filtering-Correlation-Id: d7fe414e-9bbf-40ea-d2f2-08de7a27b1d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: qYnya3Kj/mCDXnreaAYWP+aY/XZsP0TfaeBEQ8sLrXbCNlCpoflrQj6vYtJM3vbAZY9LMP06qYcTgurgbQ2Jv7fhbPv014v9lG+xZD8FaQ2FYugEukDbxBqjIMvu2L7oYaZ2xllz6ioWrCGbkFbvtDdC1eim16+ae1H/PiO7QB/+BCn7FtEX22ylJnfmFlTHdTy8biZoNQjWdus72Tuz2nUpnoOCOYQy32zmlm8uT8W4hUxu4JlVjx9DxQGv6VcV/66dlLiLn85SU/LmAzZEoDRDOwHj+3lPS+Cbs7FaIXENDwXdN/AGBip74bmHQsD6z8DhZCjzqA40IxN/FG4RgJZFOYmj43H1lTE90Qf118oWmhOQTHMZ4DVGe52fWhCA0olPYqomO8OS73DBVnwYHk1tqwP0Qqp+XFczRS9x768PW8CFU+5KVfVGnQz+WQp3+L600vl3Wk/rnwLD5LgGOMOw6+TVnPVbp/QZeimVoTtmsISU2U0Lnfz947uc8rPHneG9EMK7XYDW2MwP9hAVN2qEq2BeixrCUID2+lbLkBB3n8mA0xoRHZj0Gpjc4A9YBlTKyvprGjxtuKEARDhuEBGE2fQlc57t/IUEV6fHAM2cEDbCfJJg1RZsTD5EJfohNvU3UZkjXh1it8rFGz6JzBaqplikHQ+gGvmNyUOgJgnOOVcpekLqiG//pWbPzLn1JIc1LVod1BEzi1JP9ygqmtR289e//W//0mMjKFC6xZU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY1PR03MB7996.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?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-ascii?Q?0aarBUb2pQ=3D=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7fe414e-9bbf-40ea-d2f2-08de7a27b1d1 X-MS-Exchange-CrossTenant-AuthSource: BY1PR03MB7996.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2026 19:53:23.9622 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dTvzmGK2/qOVhSnJF3Y2+3cFLoAqV6HcqC/qHa8hIqdMVbQhGnJNCwHwlV+NCRMNfuy9DKepL1lrIe8y7eX5uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6079 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1772654046344158500 Content-Type: text/plain; charset="utf-8" struct cpuinfo_x86 .x86 =3D> .family .x86_vendor =3D> .vendor .x86_model =3D> .model .x86_mask =3D> .stepping No functional change. This work is part of making Xen safe for Intel family 18/19. Signed-off-by: Kevin Lampis Acked-by: Jan Beulich --- Inside core2_vpmu_init() there is a check for family =3D=3D 6. Should this be extended to family 18/19? --- xen/arch/x86/cpu/centaur.c | 4 ++-- xen/arch/x86/cpu/hygon.c | 4 ++-- xen/arch/x86/cpu/intel_cacheinfo.c | 6 +++--- xen/arch/x86/cpu/mtrr/generic.c | 6 +++--- xen/arch/x86/cpu/mwait-idle.c | 4 ++-- xen/arch/x86/cpu/vpmu.c | 4 ++-- xen/arch/x86/cpu/vpmu_amd.c | 6 +++--- xen/arch/x86/cpu/vpmu_intel.c | 6 ++++-- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/cpu/centaur.c b/xen/arch/x86/cpu/centaur.c index d2e7c8ec99..9123b05dc1 100644 --- a/xen/arch/x86/cpu/centaur.c +++ b/xen/arch/x86/cpu/centaur.c @@ -41,7 +41,7 @@ static void init_c3(struct cpuinfo_x86 *c) } } =20 - if (c->x86 =3D=3D 0x6 && c->x86_model >=3D 0xf) { + if (c->family =3D=3D 0x6 && c->model >=3D 0xf) { c->x86_cache_alignment =3D c->x86_clflush_size * 2; __set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability); } @@ -52,7 +52,7 @@ static void init_c3(struct cpuinfo_x86 *c) =20 static void cf_check init_centaur(struct cpuinfo_x86 *c) { - if (c->x86 =3D=3D 6) + if (c->family =3D=3D 6) init_c3(c); } =20 diff --git a/xen/arch/x86/cpu/hygon.c b/xen/arch/x86/cpu/hygon.c index b99d83ed4d..7a9fc25d31 100644 --- a/xen/arch/x86/cpu/hygon.c +++ b/xen/arch/x86/cpu/hygon.c @@ -41,12 +41,12 @@ static void cf_check init_hygon(struct cpuinfo_x86 *c) =20 /* Probe for NSCB on Zen2 CPUs when not virtualised */ if (!cpu_has_hypervisor && !cpu_has_nscb && c =3D=3D &boot_cpu_data && - c->x86 =3D=3D 0x18) + c->family =3D=3D 0x18) detect_zen2_null_seg_behaviour(); =20 /* * TODO: Check heuristic safety with Hygon first - if (c->x86 =3D=3D 0x18) + if (c->family =3D=3D 0x18) amd_init_spectral_chicken(); */ =20 diff --git a/xen/arch/x86/cpu/intel_cacheinfo.c b/xen/arch/x86/cpu/intel_ca= cheinfo.c index e88faa7545..a81d0764fb 100644 --- a/xen/arch/x86/cpu/intel_cacheinfo.c +++ b/xen/arch/x86/cpu/intel_cacheinfo.c @@ -168,15 +168,15 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c) * Don't use cpuid2 if cpuid4 is supported. For P4, we use cpuid2 for * trace cache */ - if ((num_cache_leaves =3D=3D 0 || c->x86 =3D=3D 15) && c->cpuid_level > 1= && - c->x86_vendor !=3D X86_VENDOR_SHANGHAI) + if ((num_cache_leaves =3D=3D 0 || c->family =3D=3D 15) && c->cpuid_level = > 1 && + c->vendor !=3D X86_VENDOR_SHANGHAI) { /* supports eax=3D2 call */ unsigned int i, j, n, regs[4]; unsigned char *dp =3D (unsigned char *)regs; int only_trace =3D 0; =20 - if (num_cache_leaves !=3D 0 && c->x86 =3D=3D 15) + if (num_cache_leaves !=3D 0 && c->family =3D=3D 15) only_trace =3D 1; =20 /* Number of times to iterate */ diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generi= c.c index c587e9140e..190be7f1b4 100644 --- a/xen/arch/x86/cpu/mtrr/generic.c +++ b/xen/arch/x86/cpu/mtrr/generic.c @@ -218,9 +218,9 @@ static void __init print_mtrr_state(const char *level) printk("%s %u disabled\n", level, i); } =20 - if ((boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD && - boot_cpu_data.x86 >=3D 0xf) || - boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_HYGON) { + if ((boot_cpu_data.vendor =3D=3D X86_VENDOR_AMD && + boot_cpu_data.family >=3D 0xf) || + boot_cpu_data.vendor =3D=3D X86_VENDOR_HYGON) { uint64_t syscfg, tom2; =20 rdmsrl(MSR_K8_SYSCFG, syscfg); diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index 5962ec1db9..6776eeb9ac 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -1637,7 +1637,7 @@ static int __init mwait_idle_probe(void) lapic_timer_reliable_states =3D LAPIC_TIMER_ALWAYS_RELIABLE; =20 pr_debug(PREFIX "v" MWAIT_IDLE_VERSION " model %#x\n", - boot_cpu_data.x86_model); + boot_cpu_data.model); =20 pr_debug(PREFIX "lapic_timer_reliable_states %#x\n", lapic_timer_reliable_states); @@ -1816,7 +1816,7 @@ bool __init mwait_pc10_supported(void) { unsigned int ecx, edx, dummy; =20 - if (boot_cpu_data.x86_vendor !=3D X86_VENDOR_INTEL || + if (boot_cpu_data.vendor !=3D X86_VENDOR_INTEL || !cpu_has_monitor || boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF) return false; diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index c28192ea26..64328bdf3f 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -398,7 +398,7 @@ int vpmu_load(struct vcpu *v, bool from_guest) static int vpmu_arch_initialise(struct vcpu *v) { struct vpmu_struct *vpmu =3D vcpu_vpmu(v); - uint8_t vendor =3D current_cpu_data.x86_vendor; + uint8_t vendor =3D current_cpu_data.vendor; int ret; =20 BUILD_BUG_ON(sizeof(struct xen_pmu_intel_ctxt) > XENPMU_CTXT_PAD_SZ); @@ -815,7 +815,7 @@ static struct notifier_block cpu_nfb =3D { =20 static int __init cf_check vpmu_init(void) { - int vendor =3D current_cpu_data.x86_vendor; + int vendor =3D current_cpu_data.vendor; const struct arch_vpmu_ops *ops =3D NULL; =20 if ( !opt_vpmu_enabled ) diff --git a/xen/arch/x86/cpu/vpmu_amd.c b/xen/arch/x86/cpu/vpmu_amd.c index d1f6bd5495..943a0f4ebe 100644 --- a/xen/arch/x86/cpu/vpmu_amd.c +++ b/xen/arch/x86/cpu/vpmu_amd.c @@ -532,7 +532,7 @@ static const struct arch_vpmu_ops *__init common_init(v= oid) if ( !num_counters ) { printk(XENLOG_WARNING "VPMU: Unsupported CPU family %#x\n", - current_cpu_data.x86); + current_cpu_data.family); return ERR_PTR(-EINVAL); } =20 @@ -557,7 +557,7 @@ static const struct arch_vpmu_ops *__init common_init(v= oid) =20 const struct arch_vpmu_ops *__init amd_vpmu_init(void) { - switch ( current_cpu_data.x86 ) + switch ( current_cpu_data.family ) { case 0x15: case 0x17: @@ -585,7 +585,7 @@ const struct arch_vpmu_ops *__init amd_vpmu_init(void) =20 const struct arch_vpmu_ops *__init hygon_vpmu_init(void) { - switch ( current_cpu_data.x86 ) + switch ( current_cpu_data.family ) { case 0x18: num_counters =3D F15H_NUM_COUNTERS; diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index 1e3b06ef8e..c623554e37 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -917,7 +917,9 @@ const struct arch_vpmu_ops *__init core2_vpmu_init(void) return ERR_PTR(-EINVAL); } =20 - if ( current_cpu_data.x86 !=3D 6 ) + /* XXX Does this need to be changed to include family 18/19? + * Is the core2_ function name misleading? */ + if ( current_cpu_data.family !=3D 6 ) { printk(XENLOG_WARNING "VPMU: only family 6 is supported\n"); return ERR_PTR(-EINVAL); @@ -958,7 +960,7 @@ const struct arch_vpmu_ops *__init core2_vpmu_init(void) sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt; =20 /* TODO: It's clearly incorrect for this to quirk all Intel Fam6 CPUs.= */ - pmc_quirk =3D current_cpu_data.x86 =3D=3D 6; + pmc_quirk =3D current_cpu_data.family =3D=3D 6; =20 if ( sizeof(struct xen_pmu_data) + sizeof(uint64_t) * fixed_pmc_cnt + sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt > PAGE_SIZE ) --=20 2.51.1