Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752027AbeAJRXY (ORCPT + 1 other); Wed, 10 Jan 2018 12:23:24 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44125 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbeAJRXU (ORCPT ); Wed, 10 Jan 2018 12:23:20 -0500 X-Google-Smtp-Source: ACJfBovdO6JLzDOxwITU1O5jicc27OK/6eD4FaOVYycQGj6HpYjfiwDtjTIdJwZWEhRq6fLs9pYC3A== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest From: Nadav Amit In-Reply-To: <4ceeadb7-61c0-e5b9-867d-16c2bedcabc5@redhat.com> Date: Wed, 10 Jan 2018 09:23:16 -0800 Cc: Jim Mattson , Liran Alon , dwmw@amazon.co.uk, Konrad Rzeszutek Wilk , the arch/x86 maintainers , bp@alien8.de, Tom Lendacky , aliguori@amazon.com, Arjan van de Ven , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , LKML , kvm list Content-Transfer-Encoding: 8BIT Message-Id: <35C3E23E-3BDE-4AFD-BD16-758A2D0B9037@gmail.com> References: <65578664-e3ec-f894-4e94-ff9fe6d7d6b3@redhat.com> <4ceeadb7-61c0-e5b9-867d-16c2bedcabc5@redhat.com> To: Paolo Bonzini X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Paolo Bonzini wrote: > On 10/01/2018 18:14, Jim Mattson wrote: >>>> If (a) is true, does "IBRS ALL THE TIME" usage is basically a CPU >>>> change to just create all BTB/BHB entries to be tagged with >>>> prediction-mode at creation-time and that tag to be compared to current >>>> prediction-mode when CPU attempts to use BTB/BHB? >>> >>> I hope so, and I hope said prediction mode includes PCID/VPID too. >> >> Branch prediction entries should probably be tagged with PCID, VPID, >> EP4TA, and thread ID...the same things used to tag TLB contexts. > > But if so, I don't see the need for IBPB. It is highly improbable that a microcode patch can change how prediction entries are tagged. IIRC, microcode may change the behavior of instructions and “assists" (e.g., TLB miss). Not much more than that.