Received: by 10.223.185.116 with SMTP id b49csp1024981wrg; Fri, 16 Feb 2018 11:02:12 -0800 (PST) X-Google-Smtp-Source: AH8x225D/3OAfU/i+GQUhqnqCFG4/UOqUMmBLAzx99taLJUh7EKUXc/FR3afQltBHoVcOQ9UJRz4 X-Received: by 10.101.74.3 with SMTP id s3mr6049567pgq.105.1518807732427; Fri, 16 Feb 2018 11:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518807732; cv=none; d=google.com; s=arc-20160816; b=B2GC2Ioc9xMsfj3iEwW7Gt6Di0AEGi6pH3ysVZBGHRWkvlNyXsTlDXR17fICMW9Hqq MloebM6SJszGsF/CHzWOFxRXVXAAfN79Xxq7TUqWAH3zXAsv2e6Y5NMR8xhsVwcEyd8B /wKT+8aHgvRL91IlYv8zAFXmcqCJkMSUmGvEYJku/BqL6bxvV2r3JQeoxN/ffh3uHW2n fyEjwSBs5iwssSMXeBshCtjCHGZPfPV3ttASCmlbbNJueyRsM3/ofMDfaEukedShnJcz 3K3bgEu3gcMV0I7RrYo5QMXoAHJWsOdVERdWFkozaFgmqA32y4sgEIe6hg9niEFFfGe+ TjCQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=G15zDeIuNdGg0L1/44cNojRvqUvUU8kBy1+TT25LwWE=; b=Vvky7ocPHjuWiDT6rEd1TKGmomza93dG7wHhZ1ZFn28ZUdIJ1VtBckwnR6ETdrtuhl bbYeBUj8EBRS2P9+UB87IHuhlDokYiikSfV9O9q4MzlNGzwfzPj3vzNhUjWeQYQSF/kA noGMVKYuzVmo9SVIPprn3EHpxi5/KKm3fDpbEdJWAd/Cg95PnGMKg7gPZkwQk0lCCPW6 ossm44Zpfb5SmjxOqK/RDi4g6C74jZ7U3lEn/OKNZn2hZMxMmzZIA4Lt7tcauAUzHqjn 7uWVLPtqEEWCBGMG1Nqsv6+HsMqUFStY2vgMrD6pNCuTb9IgTCVs5WUvFrM8xM8xb/w/ TcRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kt0ZWS0o; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si1521609pfg.367.2018.02.16.11.01.52; Fri, 16 Feb 2018 11:02:12 -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=fail header.i=@gmail.com header.s=20161025 header.b=kt0ZWS0o; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935000AbeBPLEo (ORCPT + 99 others); Fri, 16 Feb 2018 06:04:44 -0500 Received: from mail-wr0-f173.google.com ([209.85.128.173]:40853 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934609AbeBPLEl (ORCPT ); Fri, 16 Feb 2018 06:04:41 -0500 Received: by mail-wr0-f173.google.com with SMTP id o76so2487031wrb.7; Fri, 16 Feb 2018 03:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G15zDeIuNdGg0L1/44cNojRvqUvUU8kBy1+TT25LwWE=; b=kt0ZWS0o7hlgFI2JxBSVgnz62yGNJ9KBZrBtuxDLXsFQ1mq4SDaN9VwVFvaVSXE581 CGf27Kba03YgTtKjgC/KrcR+r2buuBF+BK5ximi0u5j6v7tGMaG5/Ebsi2GoNMWS02Jn Ih9pdWINOFx+caUIYtEB3HLZUFOZKqHWCbAuJLlzbANUidc7SgCBYoylcnmklgXRaxks WMjwh9RKWAXjuq+T6+9jV4I7amq4pjY5fnOfqCzyBOORCEhpSTQt2HoUfNWGlonURAZ2 Ic9C7wEw7JrhESbTxLCxYKWtIKqPjvPF5/sZ+7628X1iFZHuTqHaG6thYT6UGi5iUuuu 3v5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G15zDeIuNdGg0L1/44cNojRvqUvUU8kBy1+TT25LwWE=; b=DrqylLwAky1tSAEjxwGRCVJmCNIJKQfovhKU9ff6HaGLkGmxfHVhiZwH2bQD2TBJqG Z95eZBu4NAh4H25IszBwB9pz1xjGYqwBn2ioxzpZdBaYb1MwrP+qkZ4SBoQRfCf9feg3 eD6WAAHGwysuG+uroYVOqmDEjWBTfxYj3zzqLXyq4oT7dMSEQGZpp0t38sazr3Fprjhv PqFHwd2oBJdC/wrJ2hNkON51W1T7VT3J0fq1GCCTjpr70XsZbUvbrWrAOirPI8M8ImNN ZB3yDl9z/di4s0TnSQ5Sh+63BfJ6Ilz6KiNcA47TTIi6l6LKRkxJUU9rCr/HRqS0nqwb NSRg== X-Gm-Message-State: APf1xPBbyjh31aefcgROv4bgZF7uuFaOcQzNZAPBwQcPJI557xNqoVpK tNDS3R1YHQeEg8xYPAFlQrQ= X-Received: by 10.223.198.7 with SMTP id n7mr5458328wrg.130.1518779080228; Fri, 16 Feb 2018 03:04:40 -0800 (PST) Received: from [192.168.10.150] ([82.84.102.245]) by smtp.googlemail.com with ESMTPSA id v5sm20668654wra.94.2018.02.16.03.04.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Feb 2018 03:04:37 -0800 (PST) Subject: Re: [PATCH 2/2] x86/speculation: Support "Enhanced IBRS" on future CPUs To: David Woodhouse , tglx@linutronix.de, x86@kernel.org, kvm@vger.kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, arjan.van.de.ven@intel.com, dave.hansen@intel.com Cc: Ingo Molnar References: <1518449255-2182-1-git-send-email-dwmw@amazon.co.uk> <1518449255-2182-2-git-send-email-dwmw@amazon.co.uk> <7e2e5ad1-49b6-1fdb-4a62-8ad6aefc30a0@redhat.com> <1518509708.12890.33.camel@infradead.org> <27c85759-e662-d281-f8a0-0a80ca8ee18f@redhat.com> <1518517262.12890.43.camel@infradead.org> <1518518198.12890.48.camel@infradead.org> <02bd3fdd-1b73-6cab-fb09-38ba933396bd@redhat.com> <1518775136.7876.13.camel@infradead.org> <75287047-77a0-e0ff-c2e8-61c81641251e@redhat.com> <1518776517.7876.21.camel@infradead.org> From: Paolo Bonzini Message-ID: Date: Fri, 16 Feb 2018 12:04:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1518776517.7876.21.camel@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/02/2018 11:21, David Woodhouse wrote: > Why? With IBRS_ALL the guest *never* gets to affect the actual hardware > MSR, which is always on. The MSR is purely an emulated no-op. Why does > that affect migration? Because even if the host has IBRS_ALL, as long as you want to migrate to a system without IBRS_ALL the guest will likely not have it. You can fake IBRS_ALL on the older system after migration, and forcing the guest to always run with IBRS=1 even when in user mode; that is slow. Or... > Even if the guest doesn't have/support IBRS_ALL, and is frobbing the > (now emulated) MSR on every kernel entry/exit, that's *still* going to > be a metric shitload faster than what it *thought* it was doing. ... you are making every kernel entry/exit 3 times slower by adding two KVM exits (both hypervisor traps and syscalls are in the 1000-1500 clock cycles ballpark). That cannot be fast at all. Paolo