Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966526AbbBCSDk (ORCPT ); Tue, 3 Feb 2015 13:03:40 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50768 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965900AbbBCSDi (ORCPT ); Tue, 3 Feb 2015 13:03:38 -0500 Date: Tue, 3 Feb 2015 19:03:34 +0100 From: "Luis R. Rodriguez" To: David Vrabel Cc: "Luis R. Rodriguez" , konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, xen-devel@lists.xenproject.org, Borislav Petkov , kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, Andy Lutomirski , Ingo Molnar , Jan Beulich , "H. Peter Anvin" , Masami Hiramatsu , Thomas Gleixner , paulmck@linux.vnet.ibm.com Subject: Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall() Message-ID: <20150203180334.GT19988@wotan.suse.de> References: <1422323467-16713-1-git-send-email-mcgrof@do-not-panic.com> <1422323467-16713-2-git-send-email-mcgrof@do-not-panic.com> <54D0AB6B.9060909@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D0AB6B.9060909@citrix.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 29 On Tue, Feb 03, 2015 at 11:05:15AM +0000, David Vrabel wrote: > On 27/01/15 01:51, Luis R. Rodriguez wrote: > > > > +#ifndef CONFIG_PREEMPT > > +extern struct { char _entry[32]; } preemptible_hypercall_page[]; > > + > > +static inline bool xen_is_preemptible_hypercall(struct pt_regs *regs) > > +{ > > + return !user_mode_vm(regs) && > > + regs->ip >= (unsigned long)preemptible_hypercall_page && > > + regs->ip < (unsigned long)preemptible_hypercall_page + PAGE_SIZE; > > I asked for this test to be optimized. > > return (regs->ip >> PAGE_SHIFT) > == ((unsigned long)preemptible_hypercall_page >> PAGE_SHIFT) > && !user_mode_vm(regs); It didn't seem you were so sure about it and I asked some clarifications about it but you had not replied: http://www.gossamer-threads.com/lists/xen/devel/363565?page=last Luis -- 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/