From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 051C2ECD6D3 for ; Wed, 11 Feb 2026 17:58:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1228181.1534515 (Exim 4.92) (envelope-from ) id 1vqETM-00029z-9G; Wed, 11 Feb 2026 17:57:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1228181.1534515; Wed, 11 Feb 2026 17:57:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vqETM-00029s-6P; Wed, 11 Feb 2026 17:57:56 +0000 Received: by outflank-mailman (input) for mailman id 1228181; Wed, 11 Feb 2026 17:57:54 +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 1vqETK-00026u-Kn for xen-devel@lists.xenproject.org; Wed, 11 Feb 2026 17:57:54 +0000 Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azlp170120002.outbound.protection.outlook.com [2a01:111:f403:c007::2]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2d713005-0773-11f1-9ccf-f158ae23cfc8; Wed, 11 Feb 2026 18:57:50 +0100 (CET) Received: from CH5P223CA0022.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:1f3::12) by LV2PR12MB5966.namprd12.prod.outlook.com (2603:10b6:408:171::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.18; Wed, 11 Feb 2026 17:57:43 +0000 Received: from DS2PEPF0000343D.namprd02.prod.outlook.com (2603:10b6:610:1f3:cafe::3c) by CH5P223CA0022.outlook.office365.com (2603:10b6:610:1f3::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.10 via Frontend Transport; Wed, 11 Feb 2026 17:57:40 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by DS2PEPF0000343D.mail.protection.outlook.com (10.167.18.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.8 via Frontend Transport; Wed, 11 Feb 2026 17:57:43 +0000 Received: from localhost (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; Wed, 11 Feb 2026 11:57:41 -0600 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: 2d713005-0773-11f1-9ccf-f158ae23cfc8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h291TU6/vOtrQC/eoLHSFaSpY7CLIxhx8IkG+ot7f4nZyrLgs62N0h56zMjvLDiwEVGleSI8NSNXu/xhNMtO4/hGM8zVujEnajCmwjM0DLadUTBbW9uYTOo7KYUmIuBOElX7y5LDbWHsgNPIfC8+q8gmqGFcqupPqvDOzk4aOyRsiGV6CwZ6B47OxpnE4LRLPycbJEBx2XsAqVHvpzv5IDChYFIqjKZhz/X0ogL69XAyNstZSgzVrxdA+Sz4RA656g720cVYpRJfuxuKh7V0tVqoxSUOuIP1EiqOAQdyIrU2ovG84vn5g0FlUZ3yEOofoTT80rIPliklCVawZ1C2Ig== 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=nWihIsOMir/QyGHelVxwovWm2/FXSR3+lVaRuDFLVjY=; b=jp+jujHeLRa4Yvrc3oNNotGNacWdVI3cBe6BiYS58NoaqRS+YvzuiYOTfmjcHqQ+NEJm94fNx7pXBsIOBSHhvbazdRQrffYky6xAc/9+kFsrWBbXczL+06Nvoev1dEjAIzUaY7jWiKySPDSSETH4H0ZAVOFzGYheNngLdU60LlbM5TAbkpNPPUh3Qykf+L8ZjbdzIHjgaG5Us+b8HK89fhzdhyM3+uZHDqK1SMRRmxjBL3vMqzWA6v0pNaRCUx4IpEgM5WlW9955HMp8wfwiZe3SYQFYVym5qoiutpm9M2ry2Xclz8YBWwqfyh6FuVJIL4M6uA7mM+asF/QTaKgmKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com 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=nWihIsOMir/QyGHelVxwovWm2/FXSR3+lVaRuDFLVjY=; b=CKs4AzOwKObOuKWNSb3BDOBWRlW1cIs8DjaN1XFC/gSMadyZYwUdIJKpo7x473nQLe5QI9OMu9W/eJpiwLLpxC9+QLDDd+VmSfc6Mk2R2b4XoO4t8485/A06eNZZM7IEQA0jkv6pxTBLmZtIGHj4ZgQXkEgIlCqjd2wmXDlx33Y= 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 (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 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Date: Wed, 11 Feb 2026 18:57:40 +0100 Message-ID: CC: Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Jason Andryuk , , Xen-devel Subject: Re: [PATCH 03/12] x86: Add cpu_vendor() as a wrapper for the host's CPU vendor From: Alejandro Vallejo To: Alejandro Vallejo , Jan Beulich X-Mailer: aerc 0.20.1 References: <20260206161539.209922-1-alejandro.garciavallejo@amd.com> <20260206161539.209922-4-alejandro.garciavallejo@amd.com> <7eeb369d-04a9-4c17-983c-078e45b4679d@suse.com> In-Reply-To: X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343D:EE_|LV2PR12MB5966:EE_ X-MS-Office365-Filtering-Correlation-Id: 19519af5-ec61-46f8-25bf-08de69970e27 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: =?utf-8?B?T1Aybk82bGxOeEZJZlBaSitNeWhJTUdYOFFMWjBHTDFYUno3SnJZMXl5ZFVR?= =?utf-8?B?bWwzcnQyUFNDVCtKdGNsOVEzT25wWWRtUmVxVmNSZTdqVnJQVm84WXR3T2lt?= =?utf-8?B?ZW9hWEROanpaVFlLV2VBNEFRTnFLWFM1Y1c4aGFtdVhnYUFTYVVud1FEUEFn?= =?utf-8?B?TnNYNWxoeWxTeXorK2dSODYwaXBWdndoeHNoYmtZUlZqbWZTdlBGOGlIT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MlB2OVpLZmNhY1p4cWlBZkprWWZX?= =?utf-8?B?MS9vdysrb0QwMlRtYUVSMkxpK0V0YlovRy95Nlo5UnZwYmRua1A0a0J1cS9T?= =?utf-8?B?bE9lRTNzbFN4QTY0aWNBZnZGamhsVm5sL1dXSkQ3SG5PWmtEZUFva2N0cmdO?= =?utf-8?B?UDJBMkpqTURJVG1rcDNNWHF2T3VvWFZUK3JGcTBjcU44MWc5QnBZNmNTUmxp?= =?utf-8?B?WnlBZ0MreE5tN0twZEhuTkNRMEV3PT0=?= 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: KLarjczLkguzCnaiDdfEDmKN8/QGHfvaetbVfNzTkA8iMrx8McgubH7T1z3H48TsikDPqPumdZWwaxUJ3zfsfvUcjtjWCq/T4ZWOCJaykWULECvd7Yx6DCzHbjRxHVKMGSeC/PkqvtpTZJIdso3T3N/uXqb7dqCV5Iwb5zDymrdSGFY7tht9woWf6cbofZZyQqqTGssYiMIzK+mk90H/Nzu6bVccqV0BaSry0Ph675cnFyzlnhWd31bK9rGv81wtp8FO4XXHOe19pp/N87DPqCz3fwySWmj6AwhPGjPRQuO8cJ5URr4BWzknCWGDkpbq2BmpYvF2kRzI70APjDnuarLvskT3JO0k7WSidMoKAoRT0Q9mCmlbdCZgOrDPYP8X8QKd4VwQkxVduz+KZsyoUEtAQO0lSPWqLSXU3nVGfjH3chDHdsuG5A6Fmd0wLyQl X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2026 17:57:43.1165 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19519af5-ec61-46f8-25bf-08de69970e27 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: DS2PEPF0000343D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5966 On Wed Feb 11, 2026 at 6:35 PM CET, Alejandro Vallejo wrote: > On Wed Feb 11, 2026 at 5:04 PM CET, Jan Beulich wrote: >> On 06.02.2026 17:15, Alejandro Vallejo wrote: >>> --- a/xen/arch/x86/cpu/common.c >>> +++ b/xen/arch/x86/cpu/common.c >>> @@ -328,7 +328,11 @@ void __init early_cpu_init(bool verbose) >>> *(u32 *)&c->x86_vendor_id[4] =3D edx; >>> =20 >>> c->x86_vendor =3D x86_cpuid_lookup_vendor(ebx, ecx, edx); >>> - switch (c->x86_vendor) { >>> + if ( c->x86_vendor !=3D cpu_vendor() ) >> >> When we introduce new functions to Linux-style files, nowadays we take >> the liberty and make them Xen-style right away. In entirely Linux- >> style functions the style should remain consistently Linux'es, though. >> > > Seeing how I added the tabs I did intend to do that. > > Muscle memory and all. Will correct on the next one. > >>> + panic("CPU vendor not compiled-in: %s", >>> + x86_cpuid_vendor_to_str(c->x86_vendor)); >> >> This will be somewhat awkward when c->x86_vendor is UNKNOWN. > > Which only happens on virtualised or imaginary CPUs. In either case you k= now > what you're running on and the information is not particularly useful. Th= e > important part is the "this hypervisor cannot run on your vendor. Enable = it > there". Oh, wait. You meant when we run on an unknown CPU and the unknown path was disabled? Yes, that's missing in the condition. if ((c->x86_vendor !=3D cpu_vendor()) || (!IS_ENABLED(CONFIG_UNKNOWN_CPU_VENDORS) && !c->x86_vendor)) A hunk got missed in refactors in the default case so that default_cpu got dropped when the unknown vendor was missing. That was present originally in= the RFC. Alejandro