Received: by 10.223.176.5 with SMTP id f5csp3466629wra; Mon, 29 Jan 2018 13:38:25 -0800 (PST) X-Google-Smtp-Source: AH8x2271RUgRWQ5Q9vKdiBmspRkFp7ilo+OWfH/2JzNX/vPt/TKFwOI3KUmqlObloP3hSKEastJ4 X-Received: by 2002:a17:902:7c03:: with SMTP id x3-v6mr21555077pll.355.1517261905722; Mon, 29 Jan 2018 13:38:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517261905; cv=none; d=google.com; s=arc-20160816; b=DySvziOda+tILEn1EWZX5989WiKNUbI1hngA3d0v9ErHnmTc0cCI2J8Bs+UiCPprvC LRvd+WuySIpek3NeiHZ8VIrxOOi0+vEegUtsa4DoA4cSEo73ITFbfsZXwFVUjYEJFpNO H7I43+Am2Z++5DWfDIr1aMao6jJBXZbetk1QUBsWIpx5NX5gvn83x1o2hSLEovUE1l55 rIhmMDPPDo0G1Boy+hxr1sfAHawlLTvckJKPkz1OW++FV/IBm/kp3fVOizLCW6OfDTzE YtsYvEELBPLVxy0yCQqSE8jO1blmd5XukLmgADo8xQGlfbTDHNvYKsCq388slXPL/uAt S5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=jQl1fiYscUjuo4a5cLeLQdOjm7X6DSJPnyMTbWfgNro=; b=AqAeDd15jwNK/jVozrhysPfSkGc0D79Rfel+qTDXLVwd0afUKhiPqsCYxZtAoefRGI aXqG+yATSswXdBTpXOnAhMP+PVl4Cy9FYmxEk80GhRO57FxyMQ8R0b7Ge0GYuo3vIOnv gLxfQ+X5wdiUrxD1lIcRZeTIeFv/9ecGdxgfmxpKhyIRkJKvBSsGBUU2OfCvlSQoTEv7 06CU/gS9DO6260IVJWLBXBcn+2MuTStNWM9iAvC3/Eh4Liv2ojHEu1cdUYSpnu0oegRC e3YUoKw7l3Qebntkz1TEoj3GaGo6chTuHsWZQxPCc0nrU2BHt++CCu7XyHRaatXfIuEy f3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qhERd8Yq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si344471pfi.32.2018.01.29.13.38.10; Mon, 29 Jan 2018 13:38: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=@google.com header.s=20161025 header.b=qhERd8Yq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbeA2VhI (ORCPT + 99 others); Mon, 29 Jan 2018 16:37:08 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:34288 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeA2VhG (ORCPT ); Mon, 29 Jan 2018 16:37:06 -0500 Received: by mail-it0-f49.google.com with SMTP id m11so586641iti.1 for ; Mon, 29 Jan 2018 13:37:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jQl1fiYscUjuo4a5cLeLQdOjm7X6DSJPnyMTbWfgNro=; b=qhERd8Yqrdm41O0tgV18srARcKL/3fGopKncGhQxYK79YCE8TYoVMJ5NRmlQ13aKL8 kKG8FgdaepORfTefHVe/YFHBywMY8xGenvdOfO06XKqDurzOUF6y+2/DHpOOczV33PUu A4PZgm++QsS0uXLPYJ8f8ivQXQBgc6HCzR298tvPwcG0gZaPeE9uD6iZgCm3cI+EVPwc 8iTqq6OUmVb2+GJecMck2BUusEHTTVACoz8lQ4g8nNx/aSEghyaHrb5Tc0rX1dkmMqlv Oqg2nvWNCNCJ+5fkmqEi/2fk72J9Q/EXPb3yUKtShrcmCQ70+MGtmXVxHtmT1qM/CGzb WnNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jQl1fiYscUjuo4a5cLeLQdOjm7X6DSJPnyMTbWfgNro=; b=O2Zg7GcZBZKXqYWthUZ9e6sIqX3HHl550R9nPHeFWz01XIElL53GMyFSJT3RFfthqw o/B2zDtYuBcPvb2R3RF1I6Nmg6FkGaRJDDqXiTYQmryHZwA9cE6fzXFjIl4bxhnrGiUM 3H9bWDE8Ul0Ut+8WCixkunCCqFmKAXPlTBVgvvEFpw283wLyZ800L3zMJ8vXnJSDIZHd dAizEhOGpszLai9OJDR+YwBDj7txcTl1PQkuYkCCDw/0HrdH8K0HoiCfGJN76wb6bBt0 3GQn8cjag4Tz7/OCurZUs6EvtW99+c7FrmqS/v76vhjISj+1h3TeR2AtuhAKsYOyxXWB L2VA== X-Gm-Message-State: AKwxyteGBwzejPzcfAgXGTcMQ33X9sxoIqIq5/Yy6pkq5wClEEEZsbLP 7h5xD4YQe7T2rsj8mvnreePnbx9nhl2I3TRJMSewFw== X-Received: by 10.36.210.69 with SMTP id z66mr29114674itf.151.1517261825835; Mon, 29 Jan 2018 13:37:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.128.7 with HTTP; Mon, 29 Jan 2018 13:37:05 -0800 (PST) In-Reply-To: <1517259759.18619.38.camel@infradead.org> References: <1516476182-5153-6-git-send-email-karahmed@amazon.de> <20180129201404.GA1588@localhost.localdomain> <1517257022.18619.30.camel@infradead.org> <20180129204256.GV25150@localhost.localdomain> <31415b7f-9c76-c102-86cd-6bf4e23e3aee@linux.intel.com> <1517259759.18619.38.camel@infradead.org> From: Jim Mattson Date: Mon, 29 Jan 2018 13:37:05 -0800 Message-ID: Subject: Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure To: David Woodhouse Cc: Arjan van de Ven , Eduardo Habkost , KarimAllah Ahmed , LKML , 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 , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Tim Chen , Tom Lendacky , kvm list , "the arch/x86 maintainers" , "Dr. David Alan Gilbert" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For GCE, "you might be migrated to Skylake" is pretty much a certainty. Even if you're in a zone that doesn't currently have Skylake machines, chances are pretty good that it will have Skylake machines some day in the not-too-distant future. In general, making these kinds of decisions based on F/M/S is probably unwise when running in a VM. On Mon, Jan 29, 2018 at 1:02 PM, David Woodhouse wrote: > > > On Mon, 2018-01-29 at 12:44 -0800, Arjan van de Ven wrote: >> On 1/29/2018 12:42 PM, Eduardo Habkost wrote: >> > >> > The question is how the hypervisor could tell that to the guest. >> > If Intel doesn't give us a CPUID bit that can be used to tell >> > that retpolines are enough, maybe we should use a hypervisor >> > CPUID bit for that? >> >> the objective is to have retpoline be safe everywhere and never use IBRS >> (Linus was also pretty clear about that) so I'm confused by your question > > The question is about all the additional RSB-frobbing and call depth > counting and other bits that don't really even exist for Skylake yet in > a coherent form. > > If a guest doesn't have those, because it's running some future kernel > where they *are* implemented but not enabled because at *boot* time it > discovered it wasn't on Skylake, the question is what happens if that > guest is subsequently migrated to a Skylake-class machine. > > To which the answer is obviously "oops, sucks to be you". So yes, > *maybe* we want a way to advertise "you might be migrated to Skylake" > if you're booted on a pre-SKL box in a migration pool where such is > possible. > > That question is a reasonable one, and the answer possibly the same, > regardless of whether the plan for Skylake is to use IBRS, or all the > hypothetical other extra stuff.