From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbbAVMzY (ORCPT ); Thu, 22 Jan 2015 07:55:24 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:48359 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbbAVMzW (ORCPT ); Thu, 22 Jan 2015 07:55:22 -0500 X-IronPort-AV: E=Sophos;i="5.09,448,1418083200"; d="scan'208";a="220496722" Message-ID: <54C0F335.6030403@citrix.com> Date: Thu, 22 Jan 2015 12:55:17 +0000 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Andy Lutomirski , "Luis R. Rodriguez" CC: kvm list , "Luis R. Rodriguez" , X86 ML , "linux-kernel@vger.kernel.org" , Steven Rostedt , Ingo Molnar , David Vrabel , Jan Beulich , "H. Peter Anvin" , Masami Hiramatsu , "xen-devel@lists.xenproject.org" , Boris Ostrovsky , Borislav Petkov , Thomas Gleixner Subject: Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted References: <1421893039-426-1-git-send-email-mcgrof@do-not-panic.com> <1421893039-426-3-git-send-email-mcgrof@do-not-panic.com> In-Reply-To: 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 On 22/01/15 03:18, Andy Lutomirski wrote: >> --- a/drivers/xen/events/events_base.c >> +++ b/drivers/xen/events/events_base.c >> @@ -32,6 +32,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> >> #ifdef CONFIG_X86 >> #include >> @@ -1243,6 +1245,17 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) >> set_irq_regs(old_regs); >> } >> >> +notrace void xen_end_upcall(struct pt_regs *regs) >> +{ >> + if (!xen_is_preemptible_hypercall(regs) || >> + __this_cpu_read(xed_nesting_count)) >> + return; > > What's xed_nesting_count? It used to prevent nested upcalls when a hypercall called from an upcall triggers another upcall. There's no way a such a nested hypercall can be preemptible so the check cfor xed_nesting_count an be removed from here. David