Received: by 10.223.185.116 with SMTP id b49csp3204061wrg; Mon, 5 Mar 2018 16:29:11 -0800 (PST) X-Google-Smtp-Source: AG47ELt+fe6RmRreNjusKydkXSKOw5jRjXDnAO3ZvYYuAUtLW/zdNNglrq71Chs2wwQCGExaogeD X-Received: by 2002:a17:902:7844:: with SMTP id e4-v6mr14326550pln.83.1520296151452; Mon, 05 Mar 2018 16:29:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520296151; cv=none; d=google.com; s=arc-20160816; b=cyv4++7UZYvN+u25sgnx8lbYFoS3igILcTzmVdA4+mKu4nbs4Dzpe2dO5p+jfWlMZS JUK9DpZiFJLaQukObyrvVNoEBbfMsgbXLMbHtxDxWB77CCRB9rknULbt2nHQ/VVBuiGG 6xjr58qNTNuVdafvGS35G9QyB42t1yrUVvQkLIFLt6dZQ2ndB4zwOc9DtEa1LbXgT0cq NSPigBJEJVHtbZD02L191B5UOWqmlmwGFpBj3UoF5CWEhGta/9gbGDwM2xJK87iGWjuu t7f/vGppnVDuVcb/n0npt7xzOChtuVdVN5tKVN3eN8pMxZLRqUHmpnF4wnvKQLv/gaVr cO2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=DTajfdMi2DzVvpv4tMGwJgmg3l2ccIrodBJpjye2SuY=; b=nkioXvTTez6IrCTit82S8G/ynLM9m+4Pz2OizB0P7VxfnSHORna0tpjug1LMhegCDT oOxZEFW8RSPEmr1SM6WDt5nWc7cfQwkp2Db1jChrtY/u07A3MVK34y36D4/AYerl+UeO I8oKMpXRQXpzJEVHrY/E0F6/WSWajuSSv02LcCCM9+BAyTEU0xolZZ1HCFI3UEthy6oj JCYx5W5dHU3I0aqyB+4KfgBSK9dDrrxd3X65CiG0Zyr37KqtVO/0IQhdOZ59SruQqjJL t78O53e6Zs+posBY6eXRK/d4WagbtSwJ2yxioX3MONbCqSuZk5Z0L7oti6HZZt+FqeCd pCOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=N+7iWTc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si9031258pgr.489.2018.03.05.16.28.57; Mon, 05 Mar 2018 16:29:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=N+7iWTc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933600AbeCFA1b (ORCPT + 99 others); Mon, 5 Mar 2018 19:27:31 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:43192 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933542AbeCFA1A (ORCPT ); Mon, 5 Mar 2018 19:27:00 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260Qut6077121; Tue, 6 Mar 2018 00:26:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=DTajfdMi2DzVvpv4tMGwJgmg3l2ccIrodBJpjye2SuY=; b=N+7iWTc8Po0zasY29hBthiCkuxTQ/KO4xAbBaB1pC+/yB7GiY8YClNKKUwBzNcUlei3o vGd0wfwGCCcFSX+evYn9/p2yldicAn4z/ZAZTSNvOf6Lzb0mPckWsb1di/FBzmOrOjcF CjKxK35b8jz1ZUeJL0p0L8UJy41NFdulJpHCicsefuz1JE8Tw74t2k6pBhcczLuwcge9 AliomcOuFPVDqDaczn4Lp76QkDn++hKwty/PBQL6LRfJ8y+wJmyn+UW+b0dBjKELuZUa F0/tlEKhtwOSVsegKwla+zC4QEss6ddbA5okcjOeY2fWLPe4OmtYNW4jVB4UYu1eVyoA KA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2ghe5xgf1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:56 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w260QtPF031524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:55 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w260QtQQ000636; Tue, 6 Mar 2018 00:26:55 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:55 -0800 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, Alexander.Levin@microsoft.com, dan.j.williams@intel.com, sathyanarayanan.kuppuswamy@intel.com, pankaj.laxminarayan.bharadiya@intel.com, akuster@mvista.com, cminyard@mvista.com, pasha.tatashin@oracle.com, gregkh@linuxfoundation.org, stable@vger.kernel.org Subject: [PATCH 4.1 63/65] kpti: Disable when running under Xen PV Date: Mon, 5 Mar 2018 19:25:36 -0500 Message-Id: <20180306002538.1761-64-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180306002538.1761-1-pasha.tatashin@oracle.com> References: <20180306002538.1761-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=684 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803060005 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Konrad Rzeszutek Wilk Very very partial backport from aa8c6248f8c75 where there is a check to see if this is an Xen PV guest - and if so disable it. The reason is that the PV ABI would require a major overhaul to be Meltdown resistent. Instead there are mitigations (PV in HVM) which are far more suitable. Signed-off-by: Konrad Rzeszutek Wilk --- arch/x86/mm/kaiser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index 50783ad4861d..05fb616c9e2a 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include /* to verify its kaiser declarations */ @@ -264,6 +265,9 @@ void __init kaiser_check_boottime_disable(void) char arg[5]; int ret; + if (xen_pv_domain()) + goto disable; + ret = cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg)); if (ret > 0) { if (!strncmp(arg, "on", 2)) -- 2.16.2