Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753775AbbDTRMR (ORCPT ); Mon, 20 Apr 2015 13:12:17 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:4192 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751764AbbDTRMQ (ORCPT ); Mon, 20 Apr 2015 13:12:16 -0400 X-IronPort-AV: E=Sophos;i="5.11,610,1422921600"; d="scan'208";a="256741909" Message-ID: <55353357.5090902@citrix.com> Date: Mon, 20 Apr 2015 18:11:51 +0100 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Andrew Cooper , Xen-devel CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , , , Konrad Rzeszutek Wilk , Boris Ostrovsky , "Rusty Russell" , Subject: Re: [PATCH] [RFC] x86/cpu: Fix SMAP check in PVOPS environments References: <1429549782-12962-1-git-send-email-andrew.cooper3@citrix.com> In-Reply-To: <1429549782-12962-1-git-send-email-andrew.cooper3@citrix.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1157 Lines: 25 On 20/04/15 18:09, 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. Reviewed-by: David Vrabel David -- 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/