Received: by 10.223.176.5 with SMTP id f5csp3592920wra; Mon, 29 Jan 2018 15:53:25 -0800 (PST) X-Google-Smtp-Source: AH8x226sKISpHC8WUhhU7NUdp94OsKHE9jYGhb303TUrzq1yikivv51Wbhs2jk23UH6jon0QdTkm X-Received: by 2002:a17:902:4906:: with SMTP id u6-v6mr17517560pld.92.1517270005419; Mon, 29 Jan 2018 15:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517270005; cv=none; d=google.com; s=arc-20160816; b=bY+Q95NaviZFJMn7jpH+RBrEU7UYWyYNLP9OLEh9xrRW17Bu4H4ZIW4Yf3huq57NyQ RcqdlgASCxOWs65mabKY13yuK5eXicRwgGyuajmq7mHZ8E/Ue0bCfPh6cERAHqVO96D+ h4ouCnPhWihNyGGV+ZqqNVLcMgIM9TtbcfjJlOIDa2txwuWfO8MudZJPstddM+YsNbEj J6uVdiYse8X/kp+zNhOjGr1us1AKgsVwXYeHK3/wd5zhyJ4lp0hmvoYvvr9f95xu8aVp 1DwHQ7cBoFJz2U9PafBHNGrbJ31ROhsyk7f4dwW7gmYoaWXRm9ZEXAUPeQWGpO3JNIyl ha+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticoutput:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=gXh/DUhq4bI9d4IstU8xAM3ZJpl19fg6xXyGY+cO0Kk=; b=hjrcQfvlOmeeLiAHPWckyCY9zvy6wK2RhRz5VHt8N1hClrbj1Uw8O3Y7Ta67593OxK J9mPzmWlJhAU/u8jnyRZQqrn3KHa9561iZbL77L2+dtMaANK8UanVnyKdkxwu48jZY4W XZgjint5b+ayboPAA8y9qqWUxoOe31W5ZV0CWwPt7yTMcIEUwCR1U6jb6ANAUcs+7vhH prVSvw96wFsKuvfU7vPqEsYAlK3AZYx+LA5GJ4Nxlh4QqWkS3qrjj4pAjvSmBv4pObH+ pYBxaha9PuWcngyGihhHMMaLPpGyfxWsypGpkTxVOwwO3WXIjon442oMnzCMqQBXfFXQ EpqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@onevmw.onmicrosoft.com header.s=selector1-vmware-com header.b=hPy8vIpK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si1527276pgu.218.2018.01.29.15.53.10; Mon, 29 Jan 2018 15:53:25 -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=@onevmw.onmicrosoft.com header.s=selector1-vmware-com header.b=hPy8vIpK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbeA2Xwl (ORCPT + 99 others); Mon, 29 Jan 2018 18:52:41 -0500 Received: from mail-bn3nam01hn0217.outbound.protection.outlook.com ([104.47.33.217]:52206 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751457AbeA2Xwj (ORCPT ); Mon, 29 Jan 2018 18:52:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gXh/DUhq4bI9d4IstU8xAM3ZJpl19fg6xXyGY+cO0Kk=; b=hPy8vIpKCdxPszDVxt3rP0Oc7gBB6C/Nmb03P6Lh8QyfwAzDqa8GpAWSnHcVqZjtofHyIwP9pkpWYeAwzgvpd8/cHryAGqvYl6wdoBmOZEQEixTJVm2utLNoWxE9yrkmkKa86/ORcdW9EXLZw3FMkC7zR7sJgmypjb3OUgoW/dA= Received: from vmware.com (208.91.1.34) by SN1PR0501MB1776.namprd05.prod.outlook.com (10.163.131.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.6; Mon, 29 Jan 2018 23:52:28 +0000 Date: Mon, 29 Jan 2018 15:51:58 -0800 From: Fred Jacobs To: David Dunn Cc: Eduardo Habkost , Arjan van de Ven , KarimAllah Ahmed , "Wilson, Matt" , "linux-kernel@vger.kernel.org" , Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu , Paolo Bonzini , Peter Zijlstra , Radim Kr??m???? , Thomas Gleixner , Tim Chen , Tom Lendacky , "kvm@vger.kernel.org" , "x86@kernel.org" , "Dr. David Alan Gilbert" , Jim Mattson , David Woodhouse Subject: Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure Message-ID: <20180129235158.GA145231@vmware.com> References: <7EB9643C-D2DD-477A-90DE-05DC653D2D4B@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7EB9643C-D2DD-477A-90DE-05DC653D2D4B@vmware.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: MWHPR15CA0054.namprd15.prod.outlook.com (10.174.254.16) To SN1PR0501MB1776.namprd05.prod.outlook.com (10.163.131.11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4b623be-0f32-417d-2817-08d567735e87 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:SN1PR0501MB1776; X-Microsoft-Exchange-Diagnostics: 1;SN1PR0501MB1776;3:IUUQIFqruuu8mv+jgnM7SxnjMymI9Exioer2rugSC9w374zbrnaGNOmHMYt08R+S1NomLOol6HyCn77dIa0nXaaMzWtrqzSd+gbvm6dTrYeijcSIiD3BfdFAuU0o7Wd548JpdtXXbKwjuIwu9NOPQtmFAKl+U8U1rJUzK11EeSjp1zg3JLQ5GIm7Bx33Q2BxKjKaDSgfhpKYE+BNZ2UaI59rU3xh/pvVDuVZ6l0jnwV8Wc4CNUT33ZzStDoS19fu;25:5Ife5/828cY4xkJeAG+ap7lL4WulRyWn+A4NZlFa1nFrtGkKBivjQx4Hkvxn/6AtguOFbMZHnE6RkOML1iVthYXnYVIIB/4Ayl7C0xOb6e4OPfrj7FHNx4PhERtwiYdANucMsz61DcX0L/yi8hw6VAc9tYgBHuMipMN2G5u4oAEcwPtvaTapsckQil4GsWsck1U/KmjCgrQEgNVd3LZWSmYyI1x3esLpA6WWZ9qslFemPotKIdaenfvw4zRYsLcXrbJNtKIYxQWYTvXukzxTTlIc5YV1xs/BlB9ppBjIYzVIa2O2LllkycxJaWfoi4XPlh/sK6pAWsZelIgGW+5+phuKkHyfDA1OXb1d2uSv4sw=;31:gujlbTJYiDN+uAjMIGDOHizAqyRchaUI+z9TPRnCqp1Z+VjBjXtoxt6zWntnaHETXh8CQsyvQJNNiHXwODErFdB+F8iZyAFnZUxetj+DYaI+wszm6CyGt+xH9nCJSd7A7bytoBLf2ttec4cYhmJwcD0wYikrgwhffRCIp8QVky2CUDFXNGOHqPmJZrmz3w5muhl+UFawz97QIRHFqqTP4hExOHc5e7LQ0f4E5l3070U= X-MS-TrafficTypeDiagnostic: SN1PR0501MB1776: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=fjacobs@vmware.com; X-Microsoft-Exchange-Diagnostics: 1;SN1PR0501MB1776;20:BlvHGX5Bc78Z/xVWEu8Nyj7j8acM7doMNY8S6qi577f4QRII0THYZovJ310mMxaT/jAI/H0ubOauATQjR0VA17fnFgFwPHAAFkJ6fxPK74/FXSqPCTOqzcZVXjDqIs0rWNJkvlT4gtfa/7icV0ckhwLux0IGYgIrfioZ0MzCxlkPl3wIfSzFRPGA0nI0P3bERZr38uUr6j4AoQ9gmGCmqCgDYPeWisfyJp1C2z+wQob9O8MjJg91zOWZU3KiNO9cU1y3/Szuoo9E3A2NEY/UIGSUatUmA+sSIBP210hXfBc9ZHpgxxSV9PdJKa6MJ/D0aQrrkrBS22E7/gb4EkLQ3IIZfukqYo7p0CEfAG7t0OELOTwsODC/ZGQg8U2xIzkx2NznKKLvbPspq5GyJ2FqhH+WxxOgNaKY4WrtG3Z0rHYeIef4ymxx3R2KIp1kaZhF2IFDexbnbKbYcVJ3yHZOdGxUzxWW2AGeKUQfazJmjvyO48L5wQ+eOLaw2vRSlZNA;4:SaeVFPfoZb6CMLWqHmGqpv3MWcxlIKLc48fBdB797kQEZuzpC8WOfC9yliRiA2Db7cOsRkWPTxXGVsRR7O96GyIjA28Wfuc+50Xgf+RAko4ZTRe4F8pcsiGOH0hk5kT0nt+3n6j8PfjOjRfWdGUYq1cRU/+mSEwXXH7B1t9WMzVcRGib2kAdY/Bm21moAlha7z6x49kZMLNF7YB3HRfvyXTotbtL0bY6L9t0bi9UNpMdOW+uHf6KEZGmQwoOFawXo2hn3wqVFlPbeTkWulJD0A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:SN1PR0501MB1776;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0501MB1776; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:SPM;SFS:(10009020)(376002)(346002)(396003)(366004)(39860400002)(39380400002)(199004)(189003)(377424004)(6116002)(97736004)(2906002)(305945005)(4326008)(7736002)(229853002)(7416002)(7406005)(25786009)(8676002)(81166006)(21086003)(81156014)(68736007)(1076002)(3846002)(47776003)(8666007)(55016002)(16526019)(83506002)(36756003)(6862004)(53936002)(23726003)(50466002)(66066001)(69596002)(6246003)(8936002)(58126008)(2950100002)(6636002)(37006003)(16586007)(26005)(106356001)(105586002)(87496004)(86362001)(6666003)(478600001)(5660300001)(386003)(59450400001)(54906003)(76176011)(52116002)(33656002)(316002)(7696005)(27376003)(18370500001);DIR:OUT;SFP:1501;SCL:5;SRVR:SN1PR0501MB1776;H:vmware.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR0501MB1776;23:kpDhCb+nGUHg6Nz3lSiBh8zhQQnI2BKRfbBzKn3?= =?us-ascii?Q?4H4yVqdK2u9VFEwt7+IXZ4WZJ6zmbGLt4/iseqjV3VHPmA2T7uYe8SK+Gv2S?= =?us-ascii?Q?Fva/XG+aaFl3YtLOatVQfA40jpBjPo9B1CcbrBwXFKjvAh+UvxzMRzu2Biao?= =?us-ascii?Q?qzB42tK0vDXRUnifDWy9UyNFdX81l81TiQDV8tciMj5jcG2eQVRcMQ1OUYjN?= =?us-ascii?Q?TBCKBqDnu/lKuicGb9ESnt00Til9Pb+ZeWHIgQz4s8xvm1xPKNH0nek/3eyf?= =?us-ascii?Q?du7tpkeit08Ch+Dn97Q72pdXD8zUTkEeNXbF3z0EVkoRAHRmtk5tsJU4WQdk?= =?us-ascii?Q?a2nEyfqtKz60gjR2tBuhPhTSOwzzOpFppiKdBXl6LkJYmuJebPNMnXbjTPps?= =?us-ascii?Q?xO/lElQN8VPKazxQs+JJVXbkG5mzBA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Ip887UnbbofN0NcUBolgwEmzl61glMHRwem1IGHgx+wg9FMUc9CP1WG9b7 SpamDiagnosticOutput: 1:22 X-Microsoft-Exchange-Diagnostics: 1;SN1PR0501MB1776;20:QOLQe2t6oI7emUofsScRcKImKN9FZ9Q6FDlBQmNB7buCCYcgPZvLkJ1t1DrdA+/YtjGyieicNeVUlJAHp6bDJ2DYPZSgsRZqZBwWGv9VtIQq0xxF7jMvF//2CFfIy8vRN/PpOAdWwrnbrFVIU1zDDiRUNc0mSOniYhhiwwdNMyA= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 23:52:28.3231 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4b623be-0f32-417d-2817-08d567735e87 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0501MB1776 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (Apologies as I was brought into this thread late, but I believe I have context). Could a new "feature" be enumerated on Skylake and beyond which specifies that a particular problem exists which requires different mitigation than on previous processors? Perhaps a CPUID bit enumerating this feature (along side IBRS, IBPB and STIBP) could be exposed on only the newer CPUs. System software could then query this to know what form of mitigation is necessary. This could be over-reported in virtualized environments (e.g. a Nehalem CPU could be represented as needing the Skylake mitigation), such that sometimes the heavier Skylake+ mitigation would be applied on older CPUs. This is correct, just slower. I'm just suggesting this rather than keying on Family/Model/Stepping to avoid breaking virtual machine migration, et cetera. Thanks, Fred, sticking his neck out. On Jan 29 2:29PM, David Dunn wrote: > On Mon, 2018-01-29 at 13:45:07 -0800, Eduardo Habkost wrote: > > > Maybe a generic "family/model/stepping/microcode really matches > > the CPU you are running on" bit would be useful. The bit could > > be enabled only on host-passthrough (aka "-cpu host") mode. > > > > If we really want to be able to migrate to host with different > > CPU models (except Skylake), we could add a more specific "we > > promise the host CPU is never going to be Skylake" bit. > > > > Now, if the hypervisor is not providing any of those bits, I > > would advise against trusting family/model/stepping/microcode > > under a hypervisor. Using a pre-defined CPU model (that doesn't > > necessarily match the host) is very common when using KVM VM > > management stacks. > > > > Eduardo, > > I don't see how this is possible in a modern virtualization environment. > > Under VMware, a VM will be migrated to SkyLake if one is in the cluster and supports the features exposed to the VM. This can occur for suspend/resume as well. > > The migration pool isn't a constant. Hosts can be added to a cluster and VMs can be instructed to move across clusters. So there doesn't need to be a SkyLake around when the VM powers on in order for it to eventually end up on a SkyLake. > > Even if we expose bit to indicate that FMS matches the underlying host, when does the guest know to query that? The VM can be moved at any point in time, including after the guest asks if FMS matches host. > > My apologies for posting onto the mailing list out of the blue. Someone asked my opinion on this suggestion. I'm definitely interested in figuring out whether Linux can fully mitigate the SkyLake RSB problem in virtual environments, but it's not clear how best to achieve that. > > Thanks, > > David Dunn >