linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: david.vrabel@citrix.com, konrad.wilk@oracle.com,
	boris.ostrovsky@oracle.com, xen-devel@lists.xenproject.org
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	kvm@vger.kernel.org, "Luis R. Rodriguez" <mcgrof@suse.com>
Subject: [RFC v3 0/2] x86/xen: add xen hypercall preemption
Date: Wed, 21 Jan 2015 18:17:17 -0800	[thread overview]
Message-ID: <1421893039-426-1-git-send-email-mcgrof@do-not-panic.com> (raw)

From: "Luis R. Rodriguez" <mcgrof@suse.com>

After my last respin Andy provided some ideas as how to skip
IRQ context hacks for preemption, this v3 spin addresses that
and a bit more.

This is based on both Andrew Cooper's and David Vrabel's work,
further modified based on ideas by Andy Lutomirski to avoid
having to deal with preemption on IRQ context. Ian had originally
suggested to avoid the pt_regs stuff by using a CPU variable but
based on Andy's observations it is difficult to prove we will
avoid recursing or bad nesting when dealing with preemption out
of IRQ context. This is specially true given that after a hypercall
gets preempted the hypercall may end up another CPU.

This uses NOKPROBE_SYMBOL and notrace since based on Andy's advice
I am not confident that tracing and kprobes are safe to use in what
might be an extended RCU quiescent state (i.e. where we're outside
irq_enter and irq_exit).

I've tested this on 64-bit, some testing on 32-bit would be
appreciated.

Luis R. Rodriguez (2):
  x86/xen: add xen_is_preemptible_hypercall()
  x86/xen: allow privcmd hypercalls to be preempted

 arch/x86/include/asm/xen/hypercall.h | 20 ++++++++++++++++++++
 arch/x86/kernel/entry_32.S           |  2 ++
 arch/x86/kernel/entry_64.S           |  2 ++
 arch/x86/xen/enlighten.c             |  7 +++++++
 arch/x86/xen/xen-head.S              | 18 +++++++++++++++++-
 drivers/xen/events/events_base.c     | 13 +++++++++++++
 include/xen/events.h                 |  1 +
 7 files changed, 62 insertions(+), 1 deletion(-)

-- 
2.1.1


             reply	other threads:[~2015-01-22  2:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  2:17 Luis R. Rodriguez [this message]
2015-01-22  2:17 ` [RFC v3 1/2] x86/xen: add xen_is_preemptible_hypercall() Luis R. Rodriguez
2015-01-22  3:07   ` Andy Lutomirski
2015-01-22 19:30     ` Luis R. Rodriguez
2015-01-22 20:01       ` Andy Lutomirski
2015-01-22 21:09         ` Luis R. Rodriguez
2015-01-22 21:44           ` Andrew Cooper
2015-01-22 22:44             ` Luis R. Rodriguez
2015-01-22  2:17 ` [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted Luis R. Rodriguez
2015-01-22  3:18   ` Andy Lutomirski
2015-01-22 12:55     ` [Xen-devel] " David Vrabel
2015-01-22 17:56       ` Luis R. Rodriguez
2015-01-22 19:30     ` Luis R. Rodriguez
2015-01-22 11:50   ` [Xen-devel] " Andrew Cooper
2015-01-22 13:56     ` Steven Rostedt
2015-01-22 18:39       ` Luis R. Rodriguez
2015-01-22 20:16         ` Steven Rostedt
2015-01-22 20:24           ` Andy Lutomirski
2015-01-22 20:37             ` Steven Rostedt
2015-01-22 20:58               ` Andy Lutomirski
2015-01-22 21:16                 ` Steven Rostedt
2015-01-22 21:21                   ` Andy Lutomirski
2015-01-22 22:29                 ` Andrew Cooper
2015-01-22 21:07           ` Paul E. McKenney
2015-01-22 18:41     ` Luis R. Rodriguez
2015-01-22 13:10   ` Julien Grall
2015-01-22 18:56     ` Luis R. Rodriguez
2015-01-22 20:31       ` Julien Grall

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=1421893039-426-1-git-send-email-mcgrof@do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).