Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1922977lqp; Tue, 16 Apr 2024 01:42:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9joJh09fCS+dSfFrnfQVlnbnRt+ZvkdYWOsWnUo1jc6gqRfvH+Vqze/GXCTkCMedlcAARrTRK+bloOsKhzfYWIvBQ6NMN25nRqJ//RA== X-Google-Smtp-Source: AGHT+IFSJbepwcS+Bunh9L2LDfdN/3WjfcPclsEQZWU5enHfJFzscmbll2sN4C462NyHS0d8odHg X-Received: by 2002:a05:6358:5b12:b0:17f:8815:ef23 with SMTP id h18-20020a0563585b1200b0017f8815ef23mr9228061rwf.10.1713256973211; Tue, 16 Apr 2024 01:42:53 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f9-20020ac87f09000000b00436a43d98besi9200930qtk.352.2024.04.16.01.42.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 01:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=HQh52zTH; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lwVj6QZY; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-146507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DB69A1C20BF9 for ; Tue, 16 Apr 2024 08:42:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A48DA83CDE; Tue, 16 Apr 2024 08:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HQh52zTH"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="lwVj6QZY" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B29A1429E; Tue, 16 Apr 2024 08:42:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713256958; cv=fail; b=Zg1dAYtzSH38siShGmQXdWIB0S9nlWSBWPfohuu3EiaIN+zfH+z808lg7b0s7STiy1lhCMETu0HtIWI9KYRt1Zc0gsg452UkOWykyPx0yvJ2XaAS1shLbvX7MD7C2NfKlodwcYlI+iW//z9EfHJnroQUbeAHhaVieiEMHJVFC+A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713256958; c=relaxed/simple; bh=GoTgsZ1W0DlxPqdoE86RyGaOyKzSENAFNz+PgATUrl8=; h=Message-ID:Date:Cc:Subject:To:References:From:In-Reply-To: Content-Type:MIME-Version; b=mJd7BMlmw1YT09PSwK5skp7+eDCU4jb+5D2bzN5DUm4CheDJfKIHhz3HBUdWE9MeZqWZ3FVNqDRNAYPXltpv5pJDMJU0TEqHJf1TxlZN1E0PxIzUS8qKcef6nykeZSGg9wnrqvxP/40E3pghBZveMqrdigCN5qRkNQYsX6trd4U= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=HQh52zTH; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=lwVj6QZY; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43G5FUiI028006; Tue, 16 Apr 2024 08:42:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : cc : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=9e72djZd2DrFRYJhwskkadP/FH0o0k0eUF6mTQXyJSE=; b=HQh52zTHvLLTs8Y25E8bZXYgFbyAfKZm6WlK0cs/SCrVcEN9kUQFpIQGdtD+56u5u/ce We2+IIiirpOI0zJMHzoltdFANFcMTSKqeZq3Aamtww4LEkZB92RXu5qwuKEr0yDU2XQl Y8+dqNV5kfRkeKkHoyUL8Doy/BC9DuamFnhJnOhb2GXx/B8R6sf/L1yavFocmnOhCDNL 48Z8refhRvET8/nwTSokihR809uhoehqPdG1TONNxfiOGLs3lf5edbbvgy+dF0hsBA6j Wblydu89SFnH/dMJ5WjvyQgIblWln+zw3toadcPcXsqTchnPke6d3TdnR0J/drXG5npv Ww== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xfgujmrwb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Apr 2024 08:42:06 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43G8Ncfv014292; Tue, 16 Apr 2024 08:42:05 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xfggd61pb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Apr 2024 08:42:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4W0SFu6v3QBw4Dl9aNSmRyRCRQtgm/wga1Wl5qBmy1ajr6QBPzxtIRkc4vOXbFV2SXBPvHhS8F5LHUrshg4PSrpcUmgEfoJfk9OMgimB8u1vv1SKvdo1Mdl9TElkh3a+IbHgNQvLGMjO8IjgY/ov3xEE6NcqHGLiIsVvfU5sBZd/n23tLr4bsQqcnAZkh4+bArV32cXJfvBxm7HvGxAltFogmawuMDNJlpcRgpsDz3ILUoLKnzG4irQx06e8MI6uE/e4e0a5LO9sr9v6TMWzeghfQ8+FYzOaRQrTJdza5mKBVAnxSqnosm6bJoLrlZALPy9GJDuviPSWV87nnAh+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=9e72djZd2DrFRYJhwskkadP/FH0o0k0eUF6mTQXyJSE=; b=eMsWWp+m5QRu33aL14Flb98y9P7TPAyEElaPLdCWxeR3km0FLU6dip4SSLfB7FSL/T+bF+oKfY5un/9syYoeUZKOQR1DwpyPhl9Y89BKbTb2dTx4LMXm+d0MRGWVNCNQuTu/P2CXqL05klm9ySw1kWxTM756ZiD8yH8xRWsM0l5i2VCG7PytWZyVdH9mSPLhMXAvm896wGRq6sS7uGki1WxPAW36KVo9vUobH2RDaP0P/Rtk6MJ7hzrbwSXl9VXVj6CsKTfhDphdFVZKqosfxjLwnmWxenO/AusZhYItEKc5f7pekpkPtkUaowCklyt9U/4s3gVwlUldg6Z4bBNreg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9e72djZd2DrFRYJhwskkadP/FH0o0k0eUF6mTQXyJSE=; b=lwVj6QZYMYqnf4uZf5215RZxmQSIl/4BvjFqINhYHUqvoq6tt2FPpMzK4PIVS3kEIkUDRoWzVuZD+Fij9JzIeyrL8UfVPIJaExfNpdwQf21FqfdYRXDVxKaLlMRIAXP+IeOs2pcTDII4GDg4EzkHGB6TRgGVIOl1t/kcJHDGgNk= Received: from SN4PR10MB5622.namprd10.prod.outlook.com (2603:10b6:806:209::18) by CH0PR10MB4923.namprd10.prod.outlook.com (2603:10b6:610:da::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Tue, 16 Apr 2024 08:42:03 +0000 Received: from SN4PR10MB5622.namprd10.prod.outlook.com ([fe80::1481:809a:af18:ac44]) by SN4PR10MB5622.namprd10.prod.outlook.com ([fe80::1481:809a:af18:ac44%5]) with mapi id 15.20.7452.049; Tue, 16 Apr 2024 08:42:03 +0000 Message-ID: <2154b190-9cd1-4b24-83bb-460a708a45a3@oracle.com> Date: Tue, 16 Apr 2024 10:41:58 +0200 User-Agent: Mozilla Thunderbird Cc: alexandre.chartre@oracle.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, daniel.sneddon@linux.intel.com, pawan.kumar.gupta@linux.intel.com, tglx@linutronix.de, konrad.wilk@oracle.com, peterz@infradead.org, gregkh@linuxfoundation.org, seanjc@google.com, dave.hansen@linux.intel.com, nik.borisov@suse.com, kpsingh@kernel.org, longman@redhat.com, bp@alien8.de, pbonzini@redhat.com Subject: Re: [PATCH] KVM: x86: Set BHI_NO in guest when host is not affected by BHI Content-Language: en-US To: Dave Hansen , Chao Gao , Andrew Cooper References: <20240411072445.522731-1-alexandre.chartre@oracle.com> <7f1faa48-6252-4409-aefc-2ed2f38fb1c3@citrix.com> <95902795-0c2c-43cc-8d87-89302a2eed2b@oracle.com> <2af16cb4-32ed-4b91-872b-f0cc9ed92e59@oracle.com> From: Alexandre Chartre Autocrypt: addr=alexandre.chartre@oracle.com; keydata= xsFNBGJDNGkBEACg7Xx1laJ1nI9Bp1l9KXjFNDAMy5gydTMpdiqPpPojJrit6FMbr6MziEMm T8U11oOmHlEqI24jtGLSzd74j+Y2qqREZb3GiaTlC1SiV9UfaO+Utrj6ik/DimGCPpPDjZUl X1cpveO2dtzoskTLS9Fg/40qlL2DMt1jNjDRLG3l6YK+6PA+T+1UttJoiuqUsWg3b3ckTGII y6yhhj2HvVaMPkjuadUTWPzS9q/YdVVtLnBdOk3ulnzSaUVQ2yo+OHaEOUFehuKb0VsP2z9c lnxSw1Gi1TOwATtoZLgyJs3cIk26WGegKcVdiMr0xUa615+OlEEKYacRk8RdVth8qK4ZOOTm PWAAFsNshPk9nDHJ3Ls0krdWllrGFZkV6ww6PVcUXW/APDsC4FiaT16LU8kz4Z1/pSgSsyxw bKlrCoyxtOfr/PFjmXhwGPGktzOq04p6GadljXLuq4KBzRqAynH0yd0kQMuPvQHie1yWVD0G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oZ0prKs2Sol7DyXGUoztGeO +64JguNXc9uBp3gkNfk1sfQpwKqUVLFt5r9mimNuj1L3Sw9DIRpEuEhXz3U3JkHvRHN5aM+J ATLmm4lbF0kt2kd5FxvXPBskO2Ged3YY/PBT6LhhNettIRQLJkq5eHfQy0I1xtdlv2X+Yq8N 9AWQ+rKrpeBaTypUnxZAgJ8memFoZd4i4pkXa0F2Q808bL7YrZa++cOg2+oEJhhHeZEctbPV rVx8JtRRUqZyoBcpZqpS+75ORI9N5OcbodxXr8AEdSXIpAdGwLamXR02HCuhqWAxk+tCv209 ivTJtkxPvmmMNb1kilwYVd2j6pIdYIx8tvH0GPNwbno97BwpxTNkkVPoPEgeCHskYvjasM1e swLliy6PdpST In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PA7P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2de::20) To SN4PR10MB5622.namprd10.prod.outlook.com (2603:10b6:806:209::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR10MB5622:EE_|CH0PR10MB4923:EE_ X-MS-Office365-Filtering-Correlation-Id: 547288de-c29e-48a5-2c5c-08dc5df11720 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u5uE91GrbLqAD4oZ7R94AnSQ8GpYcXXauryrhC7Wv4XE7g78lJ6gSvfYTichWkqPw6YsqiwOc2y8zoy2D3NHMh8+OTvV0zn9Yg+msHDdRS4PJwnaBLhPic1zIIxFA7OdLjpd2inmrBiA9oH1mD9F60RpzLWhoU4gGTWfkwDSnny+/d+KBBLoLIDYm3UL2H0kT8hUZqv09zitm+zaq3/8S+M4lWNevpFjl+PteZrnmS3khbksI6jsMcUE7wiFDpeNBEPzJgPwU9Qunozimf8duiACYAdnK0V0cAgFrc8/6M0D/ipjRKAqPz5nypf2hd+TGHYLvfBFbLnOdzZWzGA6Gd9u5yYRyOnVXzcsPvRL9q/1ukv+IDYeHeYboEQzZdDfIOI8T6/aNQVITEerwSsuKLFxSvFFeFU0CfhyAuitOvLDwYvSUIKw5i3fTY1HbSzJa8xZtX1TgyxcvOaX0Q0ZZCKNe7RWDj7kQE/x8L4Vfie3rYZqOeGZAn003jozlwEWtyigbsjiVrppExmfdxLT0YPii2livLovAHOjpSHJ4yX8I8hFkRHFcVGd7EJi2nexigDJdbQjR2r/gcFgtelLqymg9N3eoGkV7rtb33BBLwiIn1j4T3Mm8WKljATZzbI1VUP0SgqBHlnd8IdRiNard1NRsJt7QMBjh5F/5AiMX9k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN4PR10MB5622.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZXFJOExzSEo5R1FnZmtUempQalgrb2FoUm56dHk4Y3NnS0c5U1FWTzJTZnBP?= =?utf-8?B?Ymh4bVFZemxxaDdqVklHcDBBUGt2WllaL29mcjJaY01QZTNxZm5oNUVZYTRm?= =?utf-8?B?VDZaVFNLQnJiRW8xQzVzL05JSFVmZE5sOXJVSTRBV0tPSXlhbFhheXF5L3hp?= =?utf-8?B?ZXRNMXllekw5WStTbWp0WTc1TjhQRUZYWVdSQ1loMDgrNHZrOGxxRkpudFNQ?= =?utf-8?B?bHg2OEt0N0tMMlpWbFcySGVxeVVQMHpRNHZFdjBrV3FPNjZ3aWRBZ1BxVmJR?= =?utf-8?B?NGVtb09zZ0JmV0lPNjNZR08wL3pyM2RDeDFZUFZqUkNTVk41c2NUd3BUdytF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haR2pVbjVHcHQ2Uy92VnJCcnpYVVdR?= =?utf-8?B?VUE9PQ==?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7/8cZvrnq215svJCWbEPLUC5b+QKwSCIN7Kfzq7UpDTw3K3NLk6qoIIIjcCtO0iOfXhkOZzwOepA4Zm74CIwmT92v+VUZJtze042S44woL2Wo55UoSjT+Rujhskxn7ecZK2D3raRWGkKKarh0g1k0xQsc2y/RA+TWn9PXBpOyHLcEdlF4qMvGzZu/CWgjZhMo+b4P7WKMx5/aHJWhvRgKL0yy4TwQU5QIBDiWjtq2Zv64DZHu5CNR7o5jHVrKpReZ+DhInsdbmgHvK2qVoPTUJNkc1bRlrIStfn39hZ6dNiXIS9G3jqbqdcqrT4qOMGrd19Dobb1qkmyQ1wGx4SRnCiUIDkzHZ62hArMdiRPJEmC1MlTT+QRUp8Eswf+VSVlAcXL3ETzDTCQSC/lZzJWr2uQXmHkghagbAFgpktvgFWMZ0QWvo/2hKbeVyoE8/zwp9gQJzxzMngY0/t2QNiAOVNH3ewPH/ZPY4yTjeNbO/OSysE4zoEp1DuuQIt1tuQrHgMyIR/sVszeW9G7sgkKq22vhzlIIV+Da5o8dZsOZyn9c/dfAjU/QfNZRB0qNxrsPlC4wldw2f0MGFRUjjZIAthoN6+vytDUUj+GJrhxg4A= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 547288de-c29e-48a5-2c5c-08dc5df11720 X-MS-Exchange-CrossTenant-AuthSource: SN4PR10MB5622.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Apr 2024 08:42:03.8248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mSBAgvx1gVliBK8cU2PfeFqvnz96oooh+5Tvj6IpaU3GlZ1iFSUd/B85FYudOHU7Z9WQ2Uq3Eho/zdgkHkqB4GM/GTgrvKzj3g8Jykp/eXQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB4923 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-16_06,2024-04-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404160053 X-Proofpoint-ORIG-GUID: bK9JvDHSLXjHmGBkyy5VbPSmANRqoldY X-Proofpoint-GUID: bK9JvDHSLXjHmGBkyy5VbPSmANRqoldY On 4/15/24 19:17, Dave Hansen wrote: >> +       /* >> +        * The following Intel CPUs are affected by BHI, but they don't have >> +        * the eIBRS feature. In that case, the default Spectre v2 mitigations >> +        * are enough to also mitigate BHI. We mark these CPUs with NO_BHI so >> +        * that X86_BUG_BHI doesn't get set and no extra BHI mitigation is >> +        * enabled. >> +        * >> +        * This avoids guest VMs from enabling extra BHI mitigation when this >> +        * is not needed. For guest, X86_BUG_BHI is never set for CPUs which >> +        * don't have the eIBRS feature. But this doesn't happen in guest VMs >> +        * as the virtualization can hide the eIBRS feature. >> +        */ >> +       VULNWL_INTEL(IVYBRIDGE_X,               NO_BHI), >> +       VULNWL_INTEL(HASWELL_X,                 NO_BHI), >> +       VULNWL_INTEL(BROADWELL_X,               NO_BHI), >> +       VULNWL_INTEL(SKYLAKE_X,                 NO_BHI), >> +       VULNWL_INTEL(SKYLAKE_X,                 NO_BHI), > > Isn't this at odds with the existing comment? > > /* When virtualized, eIBRS could be hidden, assume vulnerable */ > > Because it seems now that we've got two relatively conflicting pieces of > vulnerability information when running under a hypervisor. It's not at odd, it's an additional information. The comment covers the general case. When running under a hypervisor then the kernel can't rely on CPU features to find if the server has eIBRS or not, because the virtualization can be hiding eIBRS. And that's the problem because the kernel might enable BHI mitigation while it's not needed. For example on Skylake: on the host, the kernel won't see eIBRS so it won't set X86_BUG_BHI. But in a guest on the same platform, the kernel will set X86_BUG_BHI because it doesn't know if the server doesn't effectively have eIBRS or if eIBRS is hidden by virtualization. With the patch, the kernel can know if the CPU it is running on (e.g. Skylake) needs extra BHI mitigation or not. Then it can safely not enable BHI mitigation no matter if it is running on host or in guest. alex.