From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbeBTHoQ (ORCPT ); Tue, 20 Feb 2018 02:44:16 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:60674 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbeBTHoP (ORCPT ); Tue, 20 Feb 2018 02:44:15 -0500 Date: Tue, 20 Feb 2018 08:44:15 +0100 (CET) From: Thomas Gleixner To: David Woodhouse cc: karahmed@amazon.de, x86@kernel.org, kvm@vger.kernel.org, torvalds@linux-foundation.org, pbonzini@redhat.com, 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 Subject: Re: [PATCH v3 1/4] x86/speculation: Use IBRS if available before calling into firmware In-Reply-To: <1519037457-7643-2-git-send-email-dwmw@amazon.co.uk> Message-ID: References: <1519037457-7643-1-git-send-email-dwmw@amazon.co.uk> <1519037457-7643-2-git-send-email-dwmw@amazon.co.uk> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Feb 2018, David Woodhouse wrote: > Retpoline means the kernel is safe because it has no indirect branches. > But firmware isn't, so use IBRS for firmware calls if it's available. > > Block preemption while IBRS is set, although in practice the call sites > already had to be doing that. > > Ignore hpwdt.c for now. It's taking spinlocks and calling into firmware > code, from an NMI handler. I don't want to touch that with a bargepole. > > Signed-off-by: David Woodhouse Reviewed-by: Thomas Gleixner