Received: by 10.223.176.5 with SMTP id f5csp1220526wra; Fri, 2 Feb 2018 13:23:21 -0800 (PST) X-Google-Smtp-Source: AH8x225mOypKo0y4gafXe9M91E/wZnF4NSlXUIMdBHgV71hgqVSRkFMzciefvNWlsuKdOht5BKyG X-Received: by 10.98.6.130 with SMTP id 124mr41505871pfg.117.1517606601032; Fri, 02 Feb 2018 13:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517606600; cv=none; d=google.com; s=arc-20160816; b=MuF60I7/msIQFc8xtcfP/as4qMGj0S9GeCfNAkxJV2eaJet6ysGdifEF0r/Z1HpCq/ pAy3fdcXxHSAvwWFWjt0RaoKnNKpSJPsoAeqyuC/Q6LljgyVBQHgCb6iOQUQpogthEYZ QVD8tvhCR8bqVMqO+PoKR9MQShQTdF5p4jSJGlVGZO9klYrEcorFs6QQppcDCBaRVvkP GkuTn2yn4klxDfYTOUqOqOHbU5YnHbhWth87IXoE9s/yNABT85sDSluksm5xvoV0ctQ3 k/GIbyAGk8DeM+o0bQcxokW/cZ7adIevqTOryl1EJi8tTxN0yoL9WmDrn9X1F0NQLwas Iqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=98bDHMqy7sYQo5wgzCY+pd70UFknv/XEsVW90siC5vQ=; b=EVyuDY4aAAAyKziOnYMtOFuGHmqv8iU55T+TtmkK2M1aqCgSv99V3QpsVjRRD7+OAz +ScokbtJIjmU3romAY9zd1I4KgyW6G03668++kTLm/LqF6P+qWvh05zZtGpwQYtVk8Hg 6UDaLRtdkk6PANVFYHfBF+Bw7zPlfQ4geW+P978TqOq2+d09SRdo8EPjZnBlxveNKUgk +b3xC4Tb/EWJ7BZ3NWRYmM5dO5avQuHHRYhAE66bvIfcLtXGyvTYQws6HWmAh/3DzSI3 d+IHlxgIj10wdTmP9dm+eJeyBcKihvMdvqq5QOfQTG5PTZy1pOo6pASGvB4DX/fskQdS 0wsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=TJrcQWXX; 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 z71si1957771pgd.819.2018.02.02.13.23.03; Fri, 02 Feb 2018 13:23:20 -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=TJrcQWXX; 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 S1752762AbeBBUyN (ORCPT + 99 others); Fri, 2 Feb 2018 15:54:13 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:45256 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbeBBUx4 (ORCPT ); Fri, 2 Feb 2018 15:53:56 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w12KqP3Y097424; Fri, 2 Feb 2018 20:52:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : content-transfer-encoding; s=corp-2017-10-26; bh=98bDHMqy7sYQo5wgzCY+pd70UFknv/XEsVW90siC5vQ=; b=TJrcQWXX4eGLFt5QQmjEu9Rg79c4KfPTreWkYCfecdeF4eAF6HnSljeU0OvbqrKauHuS JtQ+yk08rvAytId5naUGKGR2UwIGf+2fmfxLM4H9Qewbx/kWy0BnZjQfYMEGTK/rPjpl yqrlkGYmVULNUR1FznrwTNC0q9IQ5ZlVKN5jV9KhFx8U11cpeFr1aznE4XL/mZxpLp7u AZc/XTSFPHE5reTGb5YfCJvVLTdJ8UQZdF9SZp6g5QbFyktfx7JMRxE9UAuEZzWZjt+0 4C2Bjtue/5E9UrVgIbtwWFQoq+m3oJL25w/VrqJmFQIPzA9IZOvaZpPy+MMnwqajE9o+ /g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2fvv0p0x65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Feb 2018 20:52:25 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w12KqOjF015941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 2 Feb 2018 20:52:24 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w12KqMjX025943; Fri, 2 Feb 2018 20:52:23 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 02 Feb 2018 12:52:22 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id 9BDB46A0A42; Fri, 2 Feb 2018 15:52:20 -0500 (EST) Date: Fri, 2 Feb 2018 15:52:20 -0500 From: Konrad Rzeszutek Wilk To: David Woodhouse Cc: KarimAllah Ahmed , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Ashok Raj , Asit Mallick , Dave Hansen , Arjan Van De Ven , Tim Chen , Linus Torvalds , Andrea Arcangeli , Andi Kleen , Thomas Gleixner , Dan Williams , Jun Nakajima , Andy Lutomirski , Greg KH , Paolo Bonzini , Peter Zijlstra Subject: Re: [PATCH v6 2/5] KVM: x86: Add IBPB support Message-ID: <20180202205220.GA2516@char.us.oracle.com> References: <1517522386-18410-1-git-send-email-karahmed@amazon.de> <1517522386-18410-3-git-send-email-karahmed@amazon.de> <20180202174932.GR28192@char.us.oracle.com> <1517594544.31953.62.camel@infradead.org> <20180202195601.GD28192@char.us.oracle.com> <1517602575.31953.74.camel@infradead.org> <20180202202857.GI28192@char.us.oracle.com> <1517603487.31953.76.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1517603487.31953.76.camel@infradead.org> User-Agent: Mutt/1.8.3 (2017-05-23) Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8793 signatures=668661 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=631 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802020251 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 02, 2018 at 08:31:27PM +0000, David Woodhouse wrote: > On Fri, 2018-02-02 at 15:28 -0500, Konrad Rzeszutek Wilk wrote: > >=20 > > >=A0 > > > No. The AMD feature bits give us more fine-grained support for expo= sing > > > IBPB or IBRS alone, so we expose those bits on Intel too. > >=20 > > But but.. that runs smack against the idea of exposing a platform tha= t > > is as close to emulating the real hardware as possible. > >=20 > > As in I would never expect an Intel CPU to expose the IBPB on the 0x8= 000_0008 > > leaf. Hence KVM (nor any hypervisor) should not do it either. > >=20 > > Unless Intel is doing it? Did I miss a new spec update? >=20 > Are you telling me there's no way you can infer from CPUID that you're > running in a hypervisor? That is not what I am saying. The CPUIDs 0x40000000 ... 0x400000ff are reserved for hypervisor usage. The SDM is pretty clear about it. The Intel SDM and the AMD equivalant are pretty clear about what the other leafs should have on its platform. [5 minutes later] And I am eating my words here.=20 CPUID.80000008 shows how MAXPHYSADDR is used (on the Intel SDM). Never mind the noise.