Received: by 10.223.185.116 with SMTP id b49csp522241wrg; Tue, 20 Feb 2018 03:30:04 -0800 (PST) X-Google-Smtp-Source: AH8x226iS2ZY+9Y6uNECKNMScvmErLebaNkixJA/ZzkNby0szR9zuJ5QTUNaXn/tyNtFvozK0m3j X-Received: by 2002:a17:902:aa8f:: with SMTP id d15-v6mr7607978plr.84.1519126204459; Tue, 20 Feb 2018 03:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519126204; cv=none; d=google.com; s=arc-20160816; b=rLGGn+eVNkX1KKpv9qlGSV64Q/TYByJ9s/KfMe31ZnGzWl/q19ZhyTN8iE0x5ckT80 IKPQGYJahStKxH9vYhcTFAOylC/tNgLlhcCP8iKmMD+u1vqPqUD4mF5A96mo6BTfRnUM T0bvC33hZTZ86l5ZOJ4j1g/SkcNaxzb3kPNua+aubx0uWvdz0B97yz+R3sFM0oSKA0tF Bl2J5D2AGc9RLjf9h5b8xTchGj1C0um5twgV4zG1ewoHRc5BlhQ2ISNCi9hY84+UJ2MT 73M89WLFfj/q1v9IG0fTx2CHdFafhSLQiooDo9Y+DjGohps27lokrz7OkterixIlM4Yh oI8Q== 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:arc-authentication-results; bh=aEfJmrSLl4+7JjUdQhZgsOytOrXEDC5j4TQQNtUerp8=; b=O/h4/eFONl50oRfgiV0mZq3WQ22Do3wWfjg5ghMdppGPv+gatbfw35W2bunWgRaz/H Sv7R+s55z2mGSKPpTwC+22lhNCgtnVoXGytZbvd7uiDNJqtdqSzInD+4QW2e+PFizd09 0x3oUrvDbcJgFazGmTaU5S/uBlT5bnCI7K7DZIIB9ePANCe4OTcNOe4MVkx5FrGUfHVT OhLUUfMRok6gx+jzXvqZnBtkCJ5RB/ZTVl9WgTtjV3W4sD7yY+J5ea4yuESQEJGcwLhg fVGyARu3si6ssGA3kXrfjDozejibXSSAXlA99QoZP2wKcEOTd683++0RRTaUKgrHSSe1 YPbg== ARC-Authentication-Results: i=1; mx.google.com; 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 g10si972056pgc.456.2018.02.20.03.29.50; Tue, 20 Feb 2018 03:30:04 -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; 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 S1751845AbeBTL3C (ORCPT + 99 others); Tue, 20 Feb 2018 06:29:02 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43456 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751511AbeBTL3B (ORCPT ); Tue, 20 Feb 2018 06:29:01 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BD7780401C1; Tue, 20 Feb 2018 11:29:00 +0000 (UTC) Received: from [10.36.118.42] (unknown [10.36.118.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31C0B2026612; Tue, 20 Feb 2018 11:28:58 +0000 (UTC) Subject: Re: [PATCH v3 2/4] x86/speculation: Support "Enhanced IBRS" on future CPUs To: David Woodhouse , Thomas Gleixner Cc: karahmed@amazon.de, x86@kernel.org, kvm@vger.kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, bp@alien8.de, peterz@infradead.org, jmattson@google.com, rkrcmar@redhat.com, arjan.van.de.ven@intel.com, dave.hansen@intel.com, mingo@kernel.org References: <1519037457-7643-1-git-send-email-dwmw@amazon.co.uk> <1519037457-7643-3-git-send-email-dwmw@amazon.co.uk> <1519116825.7876.112.camel@infradead.org> <1519125725.7876.117.camel@infradead.org> From: Paolo Bonzini Message-ID: <36704ae6-650a-e061-0220-9228173e5d81@redhat.com> Date: Tue, 20 Feb 2018 12:28:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519125725.7876.117.camel@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 20 Feb 2018 11:29:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 20 Feb 2018 11:29:00 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/02/2018 12:22, David Woodhouse wrote: >>>> However, Paolo is very insistent that taking the trap every time is >>>> actually a lot *slower* than really frobbing IBRS on certain >>>> microarchitectures, so my hand-waving "pfft, what did they expect?" is >>>> not acceptable. >>>>   >>>> Which I think puts us back to the "throwing the toys out of the pram" >> There are no more toys in the pram. I threw them all out weeks ago ... > > One option is to take the patch as-is¹ with the trap on every access. Please reword the commit message at least, mentioning that the slow case is not one we don't care much about yet (no IBRS_ALL CPUs in the wild afaik) and we won't care much about in the long run either (IBRS_ALL really only used on a handful of blacklisted processors). Thanks, Paolo > As soon as Intel define that 'IBRS_ALL_AND_THE_BIT_IS_A_NOOP' bit in > MSR_IA32_ARCH_CAPABILITIES, *then* we can expose it to guests directly > again just as we do at the moment. > > That way, the slowdown that Paolo is concerned about is limited to a > small set of current CPUs on which we're mostly unlikely to care too > much about KVM anyway.