LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	<david.vrabel@citrix.com>, <konrad.wilk@oracle.com>,
	<boris.ostrovsky@oracle.com>, <xen-devel@lists.xenproject.org>
Cc: Borislav Petkov <bp@suse.de>, <kvm@vger.kernel.org>,
	"Luis R. Rodriguez" <mcgrof@suse.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>, <rostedt@goodmis.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Ingo Molnar <mingo@redhat.com>, Jan Beulich <JBeulich@suse.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	<paulmck@linux.vnet.ibm.com>
Subject: Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()
Date: Tue, 3 Feb 2015 11:05:15 +0000	[thread overview]
Message-ID: <54D0AB6B.9060909@citrix.com> (raw)
In-Reply-To: <1422323467-16713-2-git-send-email-mcgrof@do-not-panic.com>

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);

David

  reply	other threads:[~2015-02-03 11:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  1:51 [PATCH v5 0/2] x86/xen: add xen hypercall preemption Luis R. Rodriguez
2015-01-27  1:51 ` [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall() Luis R. Rodriguez
2015-02-03 11:05   ` David Vrabel [this message]
2015-02-03 18:03     ` [Xen-devel] " Luis R. Rodriguez
2015-01-27  1:51 ` [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit Luis R. Rodriguez
2015-01-27  8:35   ` Jan Beulich
2015-01-27 10:01     ` [Xen-devel] " Andrew Cooper
2015-01-27 10:06     ` David Vrabel
2015-01-27 20:12       ` Luis R. Rodriguez
2015-01-29 20:35       ` Luis R. Rodriguez
2015-02-03  0:24         ` Luis R. Rodriguez
2015-02-03  9:58           ` David Vrabel
2015-02-05 12:47 ` [Xen-devel] [PATCH v5 0/2] x86/xen: add xen hypercall preemption David Vrabel
2015-02-05 18:15   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D0AB6B.9060909@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mcgrof@do-not-panic.com \
    --cc=mcgrof@suse.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).