From nobody Tue Feb 10 10:03:24 2026 Delivered-To: importer@patchew.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=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1770394596; cv=pass; d=zohomail.com; s=zohoarc; b=AR2kyM+IzdjV8mb5r4rsiJKlZKvP7fxo0UerF0X5KFpbkNVnYxD6/U7E6hd05fVbbEEmjYdoO2VvN3iB7saiPn5Rx/C7wNCMJa/n5oIYDlWRtnT+KK2gQNocVdwzUUrp8Y+rLkLlYa1gPYqmNxKaMc1m8Fn15pN+vuKOLA5hNPM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770394596; 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=bOhbQwb+qNaHaDSvXmZVl68QN/9CpRrOxtwZQK4VBCk=; b=HmIXvAMcaz5QKQ4nHCaPLjMTSBhGWNGMzUh2mhWBU8o7SPDH+rVC9yvCILws1SNsiVL2KC8OsZIeSB56N+TZzxuR95/XOIsCgjjizFM63r1iYf06PB8FHrnJ+kZMQ+V7shDwQhfVctvQI4cOyT/edEeW+Rbx5GQhQM6+VvDGVQA= 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=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1770394596893217.24248236019935; Fri, 6 Feb 2026 08:16:36 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1223512.1530978 (Exim 4.92) (envelope-from ) id 1voOVB-00060j-Ug; Fri, 06 Feb 2026 16:16:13 +0000 Received: by outflank-mailman (output) from mailman id 1223512.1530978; Fri, 06 Feb 2026 16:16:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1voOVB-0005zu-PF; Fri, 06 Feb 2026 16:16:13 +0000 Received: by outflank-mailman (input) for mailman id 1223512; Fri, 06 Feb 2026 16:16:12 +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 1voOVA-0005HU-7H for xen-devel@lists.xenproject.org; Fri, 06 Feb 2026 16:16:12 +0000 Received: from BYAPR05CU005.outbound.protection.outlook.com (mail-westusazlp170100001.outbound.protection.outlook.com [2a01:111:f403:c000::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 24ffcf26-0377-11f1-9ccf-f158ae23cfc8; Fri, 06 Feb 2026 17:16:09 +0100 (CET) Received: from SA1PR04CA0005.namprd04.prod.outlook.com (2603:10b6:806:2ce::14) by BL1PR12MB5804.namprd12.prod.outlook.com (2603:10b6:208:394::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.14; Fri, 6 Feb 2026 16:16:01 +0000 Received: from SN1PEPF00036F3E.namprd05.prod.outlook.com (2603:10b6:806:2ce:cafe::e6) by SA1PR04CA0005.outlook.office365.com (2603:10b6:806:2ce::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9587.16 via Frontend Transport; Fri, 6 Feb 2026 16:16:00 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SN1PEPF00036F3E.mail.protection.outlook.com (10.167.248.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.10 via Frontend Transport; Fri, 6 Feb 2026 16:16:00 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 6 Feb 2026 10:15:58 -0600 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: 24ffcf26-0377-11f1-9ccf-f158ae23cfc8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c9BY5tQwZsNpcXfl6ExoSMbCGHiP6/s6cUSwDJmeltiOQvEMjcr2JlFAejwkt8K+mqw2qBmi5pwxKm2GBJHHwStqiuhjEJKjNFgbrMBB3JPp31I5Jfa7O5AweyHHaPm7HdfKruwQWCM6opd31bO7amdJ8064fQwIe+ACVLcmTmNJS/nfBOGsAPMCoJr/UAozaoAXLV8S7hvtuaDACrsz6iJsVuAQRXJqralQnlsk/IC5ddTZSkWWsP2YgkbPHhimsW7gJ3HOT5H5hfn8zsxn/az8YXFxRwN7s8LMgZbwQYmschka63Y/PUgsgM7batIw6Q2YMj9rsqmh6IUVX0N+3g== 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=bOhbQwb+qNaHaDSvXmZVl68QN/9CpRrOxtwZQK4VBCk=; b=QwRcO5WlU/zsKn7ShgRXdN0dTzRn3kQjVE1hLKo7rOXfmbyQLtERNSGa1vMibk6mvFxINZyP6t80zpNCxy7D9iFXLmhk+VYsN6JIzWtqpwj8LS9slGZKt/mXa4VuAsMNzE37PqrTyLIttfu/PQgZeNc3bI2oJgYpNX5HTO+KLyC/tGeY4s6aZISTGEycQlr+RUPGuhiwScbXtHUOUO0LfTLuq6GKHTTPeBpqjix/qTEWh015QSFaIstrHgeLSsF9JIPUavbXN+s3yOTabcoMq/uzrJAf3JJZMNsmBWgPyH1veDGjhJyhnd181/RO6CE0xiRmD9nZqOLAeJ34M1h11A== 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bOhbQwb+qNaHaDSvXmZVl68QN/9CpRrOxtwZQK4VBCk=; b=jjnKdtnQBlmdtBvARc8qjHmCU0NGlTHjB4sU3Y+6OuFppZkSIF9qSQr80QRy3bBkMgMYrZHsttpgbfLZrcpwJmqOo0dvJCvYCsaU+7TmGg1hGFsIhiCxLptAuZPpFc6k0PaFJOjXXAEBKsfGRr8nBJOvuWNvA2//F+N5AaIu86k= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C From: Alejandro Vallejo To: CC: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Jason Andryuk Subject: [PATCH 02/12] x86: Add more granularity to the vendors in Kconfig Date: Fri, 6 Feb 2026 17:15:24 +0100 Message-ID: <20260206161539.209922-3-alejandro.garciavallejo@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206161539.209922-1-alejandro.garciavallejo@amd.com> References: <20260206161539.209922-1-alejandro.garciavallejo@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F3E:EE_|BL1PR12MB5804:EE_ X-MS-Office365-Filtering-Correlation-Id: 19df79fb-40a1-4c05-7243-08de659b0489 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qTZUjAX3HWTuSJRaXlb5exbR8cfpPfzKkabqqJI+dcGggA3z8b68nFExkYkp?= =?us-ascii?Q?cHCqL5Mm9UYvoZT2ZTM7F8b6WL9IlJQJCGmFYicwlAXVjj8PmlyW4nyirlAt?= =?us-ascii?Q?GKTyE5NpZxOPjfK3lKXACzv7KYK0N3SYx9HXBwp86Oc3eHOVIIwrRLzMSBJ0?= =?us-ascii?Q?OTTgO3w0mPv5/jL8sFWaKFqtt/V9SDftzF8UgO1nW5fjZiQe0IPaFKW6chgS?= =?us-ascii?Q?R9ceQIgyDFhEdz5rp8S8+QZMiAjtdTVIxy4dM5m/YgKd6SAPF3KIwzfDXArM?= =?us-ascii?Q?VgF6MLUVU6W/+7skJtMUz5GnpH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R8iXM0eaQ9ogtXxsCxjxrMclPZXW814/xJSjwGG0M/U0+B6XHH4?= =?us-ascii?Q?hdMvZE9wbOCXQhaNHaObc576VX6N6Raf2n+P0vkOkR4YlcLIPgTXDgw2udcx?= =?us-ascii?Q?EIyDcrfu6a2HcxquLll9lRZpBPqy9zPixpBl7vOE8kH7aW78kY/K4y87E02O?= =?us-ascii?Q?12JmEvoyhiNo/urfp2+cUC8KGxNRr0XR+qmiEFiZN3dpEWZWR7TJX7y9pgSA?= =?us-ascii?Q?AMoNNhv9eN4e1+PWRoBtCGVJgzyyjRlgIAs56qexWC/ImBEid5I1moeu/pnc?= =?us-ascii?Q?yGI4i03vW6xP2PNx6oDa0LV8HTKPLTYGqpLEefS761R32vIHCqx4H6M9Wie3?= =?us-ascii?Q?qgIHot2N5W47tSD3TCdxyMlbvDYVBwA4gBGnZxPXvOjMlKMC7HwuMHxyzMjC?= =?us-ascii?Q?Mwxh0MIvKGPaqHU3kjD92KRtRCIzPBvevmuGND2uNdv9u4HT9rNfltGMyWn9?= =?us-ascii?Q?vNaXUA=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mOU8ZwLOiXMTD2OVkMiNAWKQkftY535OQ7s87e+nde3u0cGDzRtrdsBZ3bpPekaVtk3iBIrfINvnP5Yvk2z27W2dU4CeUc9yPsylieu9BxrRAU6HqQ++sd61PQqE+FOzK9L0xDCKChxH3ZjCJJEDhggkXki03MthGzehztIjXZsi10eQTCVCVpT3TSwiOoQ/vgjpGic2OCJucmpEixvAywrII063HfI5u4g+GOYx/JnXQt16NiXZH66eWaF8+ugjzyRcWJc4No36AyRL3F7/tX0E++uFBXDM8V64rbXFIh9zjvDDosG5NA/AL7RHjkKCIhswhYvMBq1Q5Xrk5LXTb2sd0WZTj1vi9bi6ZuIBjR+rG0aJWG86NBNbqHER4fdQX4sRJxZ0hgVxaTfQwhdgdyk1M0nGZIYJzx0Jo85d1fEGJRmYWQlB4scsZuClcQyo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2026 16:16:00.2937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19df79fb-40a1-4c05-7243-08de659b0489 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F3E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5804 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1770394598709158500 Content-Type: text/plain; charset="utf-8" This enables very aggressive DCE passes on single-vendor builds in later patches, as it will allow most vendor checks to become statically chosen branches. A lot of statics go away and a lot more inlining will be allowed. A prerequisite for such optimisation is to expand Kconfig to have the full set of vendors. Adds Hygon, Centaur, Shanghai and the unknown-vendor path. Have Hygon select AMD, and Centaur|Shanghai select Intel. Not a functional change. Signed-off-by: Alejandro Vallejo --- rfc -> v1: * s/depends on/select/ * s/UNKNOWN_CPU/UNKNOWN_CPU_VENDOR/ * Removed "if unsure, say Y" --- xen/arch/x86/Kconfig.cpu | 43 +++++++++++++++++++++++++++++++++++++++ xen/arch/x86/cpu/Makefile | 6 +++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/Kconfig.cpu b/xen/arch/x86/Kconfig.cpu index 5fb18db1aa..f895cfe97a 100644 --- a/xen/arch/x86/Kconfig.cpu +++ b/xen/arch/x86/Kconfig.cpu @@ -19,4 +19,47 @@ config INTEL May be turned off in builds targetting other vendors. Otherwise, must be enabled for Xen to work suitably on Intel platforms. =20 +config HYGON + bool "Support Hygon CPUs" + select AMD + default y + help + Detection, tunings and quirks for Hygon platforms. + + May be turned off in builds targetting other vendors. Otherwise, + must be enabled for Xen to work suitably on Hygon platforms. + + +config CENTAUR + bool "Support Centaur CPUs" + select INTEL + default y + help + Detection, tunings and quirks for Centaur platforms. + + May be turned off in builds targetting other vendors. Otherwise, + must be enabled for Xen to work suitably on Centaur platforms. + +config SHANGHAI + bool "Support Shanghai CPUs" + select INTEL + default y + help + Detection, tunings and quirks for Shanghai platforms. + + May be turned off in builds targetting other vendors. Otherwise, + must be enabled for Xen to work suitably on Shanghai platforms. + +config UNKNOWN_CPU_VENDOR + bool "Support unknown CPU vendors" + default y + help + This option prevents a panic on boot when the host CPU vendor isn't + supported by going into a legacy compatibility mode and not applying + any relevant tunings or quirks. + + Not selecting this options while selecting multiple vendors doesn't have + any major effect on code size, but selecting a single vendor with this + option cleared produces a much smaller build. + endmenu diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile index 7cfe28b7ec..84b060aa41 100644 --- a/xen/arch/x86/cpu/Makefile +++ b/xen/arch/x86/cpu/Makefile @@ -3,13 +3,13 @@ obj-y +=3D microcode/ obj-y +=3D mtrr/ =20 obj-y +=3D amd.o -obj-y +=3D centaur.o +obj-$(CONFIG_CENTAUR) +=3D centaur.o obj-y +=3D common.o -obj-y +=3D hygon.o obj-y +=3D intel.o +obj-$(CONFIG_HYGON) +=3D hygon.o obj-y +=3D intel_cacheinfo.o obj-$(CONFIG_INTEL) +=3D mwait-idle.o -obj-y +=3D shanghai.o +obj-$(CONFIG_SHANGHAI) +=3D shanghai.o obj-y +=3D vpmu.o obj-$(CONFIG_AMD) +=3D vpmu_amd.o obj-$(CONFIG_INTEL) +=3D vpmu_intel.o --=20 2.43.0