From nobody Mon Feb 9 20:59:50 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=1770311427; cv=pass; d=zohomail.com; s=zohoarc; b=ccV+FOwiZPiRI+0WJgYf0KmR/tfKXyGwwbkUN8bo5hUIJpLcIAMJDAKqix2x3EaupW5L+AEnG+VOC8gPL+OXU082eePcLa2gNijGYCh8d5hQnEeoy+uXPDjaMssIOu0+0KFK28CDjc1IB1uV708SYagFuFe/qjcFRln6bmT0gP4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770311427; 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=E4FKeqmCM9a2ErEXn6Kh0b9mOhoAFlSSuBV0vP6kKFk=; b=KJFYHiT3UqvW+Rf0MtG2sjexHdOYkeoN1ah9BcuAJ82hm94LIv05hWKXtGFoa/+PxxjZfwdPqSmIbD5Y43g178jwQvYRj69rrqtYL3Bsoen+oG9gMZfEBPIxF2KRGaghKtL0jQqvpZFTUr5J6aZFjcOFxDDPjPNmvDVjq7SxA7s= 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 1770311427468915.5305016440396; Thu, 5 Feb 2026 09:10:27 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1222283.1530282 (Exim 4.92) (envelope-from ) id 1vo2rk-0003u2-5B; Thu, 05 Feb 2026 17:10:04 +0000 Received: by outflank-mailman (output) from mailman id 1222283.1530282; Thu, 05 Feb 2026 17:10:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vo2rj-0003s9-Uu; Thu, 05 Feb 2026 17:10:03 +0000 Received: by outflank-mailman (input) for mailman id 1222283; Thu, 05 Feb 2026 17:10:02 +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 1vo2ri-0003It-Nu for xen-devel@lists.xenproject.org; Thu, 05 Feb 2026 17:10:02 +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 808cf9f1-02b5-11f1-9ccf-f158ae23cfc8; Thu, 05 Feb 2026 18:10:00 +0100 (CET) Received: from BN9PR03CA0457.namprd03.prod.outlook.com (2603:10b6:408:139::12) by DM4PR12MB6010.namprd12.prod.outlook.com (2603:10b6:8:6a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.13; Thu, 5 Feb 2026 17:09:52 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:408:139:cafe::36) by BN9PR03CA0457.outlook.office365.com (2603:10b6:408:139::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9587.14 via Frontend Transport; Thu, 5 Feb 2026 17:09:48 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.0 via Frontend Transport; Thu, 5 Feb 2026 17:09:52 +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; Thu, 5 Feb 2026 11:09:50 -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: 808cf9f1-02b5-11f1-9ccf-f158ae23cfc8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kAO+Wd9NweWWzOfASMGBmsPmgVlSuCr8f4Ot6U+rBY0QaoAQHuBghGCNLQsHcWTWyI9ZaF3MdGUDdqOVuDe8hing94uwKeStP/71nw6xV/yhuoDG5LfCfZyU5QkqMzxFW+5bcUKuQctpDJjsyIhSzH2t9++Co0zprFCO0ti45ew+7o7TJvbonSRnywDEzdeSQhH0qGNJYuSV7aLw5O3JszoMPHrkBQeNvWEXTE5m5HKHoV+swedI/SAD8Sj+DGaxubxyrTArGjByfPYXrEeZXeahFEuKEpAPEckMyQgbbWivq7NvhWNg3poySAinHZmP3PCpE7Bl/5hVsrcZOFjlEQ== 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=E4FKeqmCM9a2ErEXn6Kh0b9mOhoAFlSSuBV0vP6kKFk=; b=lpzewu1hyHLymkyEkPC+N+sBNhl7cRHUIQPCwSJhJh/5BzJv+Yaeze7MS+TZ11HZSW1Z7WqY9dUDhc4oR46SB6DMLvtWij7Xw4NNrgeFRBK/07WH2tPJY9qNQo3fNQwa6/j9kiQVCz0AjLZJG9SnfkkfEagUhI6lBgAy7Nvfn2PPvGKJGT1aeVDYezL9w9F/teDLshY8sEffkr0Tl3DbOPm87PGpd1VVYSQjZDrS8I4ZkCtaQoerXNVNeBjhSZNml1yCICIDVUUH/02WOF5/T75zR8IW6wURGEunH0LS2fC3l9rSLbDaFFS8061PjuVdW/bD1bsXH1/F3b7VM2KMbw== 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=E4FKeqmCM9a2ErEXn6Kh0b9mOhoAFlSSuBV0vP6kKFk=; b=PEKn78Xl2QBq+omHbs3iFpua/u55cCbXz4A2J8fpQ3i5JcZpCH3Ajp7fpZMsVS3Vo4ZQz3qdpfwmJ2f2QXDWZSq57aX3UCMfiRQLQrhiM2yDkmGyFA5DPqgk4Clf1UIBeBEmktTu9SeaOilXSjiFgh0h/vdoM2tLvqWvgUqY54k= 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 v2 2/4] x86/hvm: Disable cross-vendor handling in #UD handler Date: Thu, 5 Feb 2026 18:09:20 +0100 Message-ID: <20260205170923.38425-3-alejandro.garciavallejo@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260205170923.38425-1-alejandro.garciavallejo@amd.com> References: <20260205170923.38425-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: BN3PEPF0000B370:EE_|DM4PR12MB6010:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f89cbd7-9528-4d3e-d118-08de64d96073 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?G9I8i8Ew1CbZ5mtRMJjgB85h47SCty2b+rsbG1/ZyFV5839zd47heBpZb5FZ?= =?us-ascii?Q?aArGit6UdCd9/dcuGJT41zWSksq93BSJKDi22F/rNeBGmbW6Wgiu1TXV9VWJ?= =?us-ascii?Q?DYQX/d4v3f/s+aXwttXwYNf13KFRZJpMl7PcXmhawWOmYlc3GcmSnuIFlQke?= =?us-ascii?Q?jqJ2wVKh8F1VhCyqjfln3fUoeVKs8JAc6FeNgIezuKGrR5DkpYnz//rHljY8?= =?us-ascii?Q?h1c74Lkq94tzt2D/ytXrs1jdoB4lwXHF7njcRvo8neyt8+25iwhuQrCMeNLJ?= =?us-ascii?Q?RI/Rztx1z18RanENBOb2HdhQrv6BqtiHNsER4w4MsGv8Q2gGqUhjyX2e7mdJ?= =?us-ascii?Q?AF9Fxwn82D/lMhdSm40GTDo+7uFpFG8r0OteynvBq+WXHu85QY9vMWZfNGXc?= =?us-ascii?Q?+Jw79z43ELcUi+a5mntEZjVjmpOG44Q/VMLf3dXdW7KDyOIwxw7a+225Sx1+?= =?us-ascii?Q?nf6Rtoywp3vnJVYNSHypAESydFJWud2Tt5SbVUF/3+rkFQemjwlEQRaJaE5g?= =?us-ascii?Q?yIMGGKcmSLEdFPLiPo9HV3P0T3o8LRlJtOgZsb+5UM8T7MAPFB5lZhT4tdIh?= =?us-ascii?Q?vW0pfCXRJAAhcmy9YUK/weQlVKVVqL8cdqz2qj+Wao71pAZZfbPua6a8tBkV?= =?us-ascii?Q?Tsl3MMClURGPZffZ7Z6W+PMTbjBbtTWQtj2ywH7NjK52rZEkIf3Lws9KApT1?= =?us-ascii?Q?8Ng7gZioyydOdiTuPCYj4d5qcOmdMYIBg7NXPNxfUx6PEJ/JxCFweUaXRFmm?= =?us-ascii?Q?qv6DbDvgWeV6H9wwxRuHBgaqWutwy6KpC5jJ63gjkstcqyZMvepNBoGWyoOi?= =?us-ascii?Q?KNRJaudR4EngDlOKuK7CO5IjJK/2OC9XYIkNI5TthQPPBJjArNC7B09WJvDw?= =?us-ascii?Q?Ca3aQZ26NB6LEdHE2htJBOs0zJOaojLDWROQayn578Q7gJADgTztteDtNNwK?= =?us-ascii?Q?izc0/FPhO9GTIqy1H/RQVk3C+kP3AQTkSvQ1Z6+1tEr+eFazmpB89zI0KoRo?= =?us-ascii?Q?sov+It00QkgMSTzfl4s8SY84V3YgH0E7dsRXRj8vzPN02Ol130f6U9TgD6V8?= =?us-ascii?Q?t8QX26oPlHsRJ1BI2rQ7pAP8sQgNbyeeAdUMvblmyY2Xc9cGuJ7VQGRXwpSI?= =?us-ascii?Q?a0GxfyODmmnqfIapDcseLGxfHsDT+r8rHyj99BNYqw7s6N/xyAH/F3Xcp+Zg?= =?us-ascii?Q?9LJY/TFCS+UsZvvjo2aErDqvwFwrYTAWMTqozVsRaY7sDLEIYRT8v9NPqlSc?= =?us-ascii?Q?aIoz7PL4hZyTtEwoar/aZVuWpdLu7Diop81wvBBvGa05cAKZXEE4yaCh2cTf?= =?us-ascii?Q?s3Vxezto0KszeGch17Pu+msl4OhfeyPuEEpRYVzcbeuH0kgnLiPMuY/GSlGU?= =?us-ascii?Q?J13yj25gaUDhnHxX6PQ76Xxr0eM0bl0XGWl2wm1FnCHTAUjrVkK2jEQNAsXA?= =?us-ascii?Q?PPiyTHg8NQNRTlEp7rpkeOzqvficqXTT1Em2rbdW1NkkawfNH+p5Ls3MH2eX?= =?us-ascii?Q?+9J+DPHJwsJb2dvq+eW+UOrDYjbZnOVCDeHj0u8bg9Knb65O50YmYdKcs4Hp?= =?us-ascii?Q?oFMbOGgilkcGVfKNCfdNHu0swmNo8RlbQm+g+8qwnHQXMxVm5AuLfcfspRy7?= =?us-ascii?Q?7Y0j2goARDXfPz9rAnHb2sM=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ED1LGKZOE2uzilZVIHgf6KW3iDGdDV/D3d850EdZdijVbVqIe81Y3DjFjr/1gQjJ7qxqHeSZ7KpYhWwL20izEkHv4+MjF/DgBPeA7vzuJ2JXhG2om0oCdphGN1d7oPXKA3PCtcUR4EW2CFiJpYBQR2aRbaDmoaNgnqg+h08SnxMr7G7m8xxTx8A4KjtguDCBVhdRhWmLcmtW3ayHxK/JC9JTaTTJH06HgDOP4sf8p6zZpAnFkQ8RnMJEs5RJmxoVgFN7XMc03KVyva1aaHCGgxnUHOtnPLY1+vmTa8B83ky6PeX3BeaVxTW86sJ+qdo5307iyQad2iMdNBvbUUwlheJfxEzFFB2w2UfuKoX6wuTvhWkTWaXkXb0qhL8InfBdblx+rfV94AOcgGjHwn4LkmtmEzopIv8GGZQKb2BZvzr1+J2JOrtKZJRXHoH0FmQ4 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2026 17:09:52.1660 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f89cbd7-9528-4d3e-d118-08de64d96073 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: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6010 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1770311429150158500 Content-Type: text/plain; charset="utf-8" Remove cross-vendor support now that VMs can no longer have a different vendor than the host. While at it, refactor the function to exit early and skip initialising the emulation context when FEP is not enabled. No functional change intended. Signed-off-by: Alejandro Vallejo --- The diff is annoying, but keeping prior logic is silly when it can be simplified and the emulation context initialisation removed on the overwhelming majority of cases. v2: * Fix bug introduced in v1: Don't emulate instructions when they shouldn't be emulated. * Refactor the function so it's simpler. --- xen/arch/x86/hvm/hvm.c | 77 +++++++++++++++----------------------- xen/arch/x86/hvm/svm/svm.c | 3 +- xen/arch/x86/hvm/vmx/vmx.c | 3 +- 3 files changed, 32 insertions(+), 51 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 4d37a93c57..8708af9425 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3832,69 +3832,47 @@ int hvm_descriptor_access_intercept(uint64_t exit_i= nfo, return X86EMUL_OKAY; } =20 -static bool cf_check is_cross_vendor( - const struct x86_emulate_state *state, const struct x86_emulate_ctxt *= ctxt) -{ - switch ( ctxt->opcode ) - { - case X86EMUL_OPC(0x0f, 0x05): /* syscall */ - case X86EMUL_OPC(0x0f, 0x34): /* sysenter */ - case X86EMUL_OPC(0x0f, 0x35): /* sysexit */ - return true; - } - - return false; -} - void hvm_ud_intercept(struct cpu_user_regs *regs) { struct vcpu *cur =3D current; - bool should_emulate =3D - cur->domain->arch.cpuid->x86_vendor !=3D boot_cpu_data.x86_vendor; struct hvm_emulate_ctxt ctxt; + const struct segment_register *cs =3D &ctxt.seg_reg[x86_seg_cs]; + uint32_t walk =3D PFEC_insn_fetch; + unsigned long addr; + char sig[5]; /* ud2; .ascii "xen" */ =20 - hvm_emulate_init_once(&ctxt, opt_hvm_fep ? NULL : is_cross_vendor, reg= s); + if ( !opt_hvm_fep ) + goto reinject; =20 - if ( opt_hvm_fep ) - { - const struct segment_register *cs =3D &ctxt.seg_reg[x86_seg_cs]; - uint32_t walk =3D ((ctxt.seg_reg[x86_seg_ss].dpl =3D=3D 3) - ? PFEC_user_mode : 0) | PFEC_insn_fetch; - unsigned long addr; - char sig[5]; /* ud2; .ascii "xen" */ - - if ( hvm_virtual_to_linear_addr(x86_seg_cs, cs, regs->rip, - sizeof(sig), hvm_access_insn_fetch, - cs, &addr) && - (hvm_copy_from_guest_linear(sig, addr, sizeof(sig), - walk, NULL) =3D=3D HVMTRANS_okay)= && - (memcmp(sig, "\xf\xb" "xen", sizeof(sig)) =3D=3D 0) ) - { - regs->rip +=3D sizeof(sig); - regs->eflags &=3D ~X86_EFLAGS_RF; + hvm_emulate_init_once(&ctxt, NULL, regs); =20 - /* Zero the upper 32 bits of %rip if not in 64bit mode. */ - if ( !(hvm_long_mode_active(cur) && cs->l) ) - regs->rip =3D (uint32_t)regs->rip; + if ( ctxt.seg_reg[x86_seg_ss].dpl =3D=3D 3 ) + walk |=3D PFEC_user_mode; =20 - add_taint(TAINT_HVM_FEP); + if ( hvm_virtual_to_linear_addr(x86_seg_cs, cs, regs->rip, + sizeof(sig), hvm_access_insn_fetch, + cs, &addr) && + (hvm_copy_from_guest_linear(sig, addr, sizeof(sig), + walk, NULL) =3D=3D HVMTRANS_okay) && + (memcmp(sig, "\xf\xb" "xen", sizeof(sig)) =3D=3D 0) ) + { + regs->rip +=3D sizeof(sig); + regs->eflags &=3D ~X86_EFLAGS_RF; =20 - should_emulate =3D true; - } - } + /* Zero the upper 32 bits of %rip if not in 64bit mode. */ + if ( !(hvm_long_mode_active(cur) && cs->l) ) + regs->rip =3D (uint32_t)regs->rip; =20 - if ( !should_emulate ) - { - hvm_inject_hw_exception(X86_EXC_UD, X86_EVENT_NO_EC); - return; + add_taint(TAINT_HVM_FEP); } + else + goto reinject; =20 switch ( hvm_emulate_one(&ctxt, VIO_no_completion) ) { case X86EMUL_UNHANDLEABLE: case X86EMUL_UNIMPLEMENTED: - hvm_inject_hw_exception(X86_EXC_UD, X86_EVENT_NO_EC); - break; + goto reinject; case X86EMUL_EXCEPTION: hvm_inject_event(&ctxt.ctxt.event); /* fall through */ @@ -3902,6 +3880,11 @@ void hvm_ud_intercept(struct cpu_user_regs *regs) hvm_emulate_writeback(&ctxt); break; } + + return; + + reinject: + hvm_inject_hw_exception(X86_EXC_UD, X86_EVENT_NO_EC); } =20 enum hvm_intblk hvm_interrupt_blocked(struct vcpu *v, struct hvm_intack in= tack) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 18ba837738..10d1bf350c 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -589,8 +589,7 @@ static void cf_check svm_cpuid_policy_changed(struct vc= pu *v) const struct cpu_policy *cp =3D v->domain->arch.cpu_policy; u32 bitmap =3D vmcb_get_exception_intercepts(vmcb); =20 - if ( opt_hvm_fep || - (v->domain->arch.cpuid->x86_vendor !=3D boot_cpu_data.x86_vendor)= ) + if ( opt_hvm_fep ) bitmap |=3D (1U << X86_EXC_UD); else bitmap &=3D ~(1U << X86_EXC_UD); diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 82c55f49ae..eda99e268d 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -803,8 +803,7 @@ static void cf_check vmx_cpuid_policy_changed(struct vc= pu *v) const struct cpu_policy *cp =3D v->domain->arch.cpu_policy; int rc =3D 0; =20 - if ( opt_hvm_fep || - (v->domain->arch.cpuid->x86_vendor !=3D boot_cpu_data.x86_vendor)= ) + if ( opt_hvm_fep ) v->arch.hvm.vmx.exception_bitmap |=3D (1U << X86_EXC_UD); else v->arch.hvm.vmx.exception_bitmap &=3D ~(1U << X86_EXC_UD); --=20 2.43.0