From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932805AbdEKMrD (ORCPT ); Thu, 11 May 2017 08:47:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49024 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbdEKMrC (ORCPT ); Thu, 11 May 2017 08:47:02 -0400 Date: Thu, 11 May 2017 14:46:58 +0200 (CEST) From: Thomas Gleixner To: Juergen Gross cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, boris.ostrovsky@oracle.com, hpa@zytor.com, mingo@redhat.com Subject: Re: [PATCH v3] x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen In-Reply-To: <566478e1-3a1c-2800-8662-09a6ad31a7b6@suse.com> Message-ID: References: <20170427050120.6894-1-jgross@suse.com> <566478e1-3a1c-2800-8662-09a6ad31a7b6@suse.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 11 May 2017, Juergen Gross wrote: > On 27/04/17 07:01, Juergen Gross wrote: > > When running as Xen pv guest X86_BUG_SYSRET_SS_ATTRS must not be set > > on AMD cpus. > > > > This bug/feature bit is kind of special as it will be used very early > > when switching threads. Setting the bit and clearing it a little bit > > later leaves a critical window where things can go wrong. This time > > window has enlarged a little bit by using setup_clear_cpu_cap() instead > > of the hypervisor's set_cpu_features callback. It seems this larger > > window now makes it rather easy to hit the problem. > > > > The proper solution is to never set the bit in case of Xen. > > > > Signed-off-by: Juergen Gross > > Any objections for carrying this through the Xen tree? Acked-by: Thomas Gleixner