Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbbFDGjU (ORCPT ); Thu, 4 Jun 2015 02:39:20 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42636 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbbFDGjL (ORCPT ); Thu, 4 Jun 2015 02:39:11 -0400 Message-ID: <556FF270.5060306@zytor.com> Date: Wed, 03 Jun 2015 23:38:40 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Andrew Cooper , Xen-devel CC: David Vrabel , Rusty Russell , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk , Boris Ostrovsky , lguest@lists.ozlabs.org, stable@vger.kernel.org Subject: Re: [PATCH] x86/cpu: Fix SMAP check in PVOPS environments References: <1433323874-6927-1-git-send-email-andrew.cooper3@citrix.com> In-Reply-To: <1433323874-6927-1-git-send-email-andrew.cooper3@citrix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 26 On 06/03/2015 02:31 AM, Andrew Cooper wrote: > There appears to be no formal statement of what pv_irq_ops.save_fl() is > supposed to return precisely. Native returns the full flags, while lguest and > Xen only return the Interrupt Flag, and both have comments by the > implementations stating that only the Interrupt Flag is looked at. This may > have been true when initially implemented, but no longer is. > > To make matters worse, the Xen PVOP leaves the upper bits undefined, making > the BUG_ON() undefined behaviour. Experimentally, this now trips for 32bit PV > guests on Broadwell hardware. The BUG_ON() is consistent for an individual > build, but not consistent for all builds. It has also been a sitting timebomb > since SMAP support was introduced. > > Use native_save_fl() instead, which will obtain an accurate view of the AC > flag. Could we fix the Xen pvops wrapper instead to not do things like this? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/