All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v3 0/2] x86/xen: add xen hypercall preemption
@ 2015-01-22  2:17 Luis R. Rodriguez
  2015-01-22  2:17 ` [RFC v3 1/2] x86/xen: add xen_is_preemptible_hypercall() Luis R. Rodriguez
                   ` (3 more replies)
  0 siblings, 4 replies; 55+ messages in thread
From: Luis R. Rodriguez @ 2015-01-22  2:17 UTC (permalink / raw)
  To: david.vrabel, konrad.wilk, boris.ostrovsky, xen-devel
  Cc: linux-kernel, x86, kvm, Luis R. Rodriguez

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


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2015-01-22 22:44 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22  2:17 [RFC v3 0/2] x86/xen: add xen hypercall preemption Luis R. Rodriguez
2015-01-22  2:17 ` [RFC v3 1/2] x86/xen: add xen_is_preemptible_hypercall() Luis R. Rodriguez
2015-01-22  2:17 ` Luis R. Rodriguez
2015-01-22  3:07   ` Andy Lutomirski
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 20:01       ` Andy Lutomirski
2015-01-22 21:09         ` Luis R. Rodriguez
2015-01-22 21:44           ` Andrew Cooper
2015-01-22 21:44           ` Andrew Cooper
2015-01-22 22:44             ` Luis R. Rodriguez
2015-01-22 22:44             ` Luis R. Rodriguez
2015-01-22 21:09         ` Luis R. Rodriguez
2015-01-22 19:30     ` 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  2:17 ` Luis R. Rodriguez
2015-01-22  3:18   ` Andy Lutomirski
2015-01-22 12:55     ` David Vrabel
2015-01-22 12:55     ` [Xen-devel] " David Vrabel
2015-01-22 17:56       ` Luis R. Rodriguez
2015-01-22 17:56       ` [Xen-devel] " Luis R. Rodriguez
2015-01-22 19:30     ` Luis R. Rodriguez
2015-01-22 19:30     ` Luis R. Rodriguez
2015-01-22  3:18   ` Andy Lutomirski
2015-01-22 11:50   ` Andrew Cooper
2015-01-22 11:50   ` [Xen-devel] " Andrew Cooper
2015-01-22 13:56     ` Steven Rostedt
2015-01-22 13:56     ` [Xen-devel] " Steven Rostedt
2015-01-22 18:39       ` Luis R. Rodriguez
2015-01-22 20:16         ` Steven Rostedt
2015-01-22 20:16         ` [Xen-devel] " Steven Rostedt
2015-01-22 20:24           ` Andy Lutomirski
2015-01-22 20:24           ` [Xen-devel] " Andy Lutomirski
2015-01-22 20:37             ` Steven Rostedt
2015-01-22 20:37             ` [Xen-devel] " Steven Rostedt
2015-01-22 20:58               ` Andy Lutomirski
2015-01-22 21:16                 ` Steven Rostedt
2015-01-22 21:16                 ` [Xen-devel] " Steven Rostedt
2015-01-22 21:21                   ` Andy Lutomirski
2015-01-22 21:21                   ` [Xen-devel] " Andy Lutomirski
2015-01-22 22:29                 ` Andrew Cooper
2015-01-22 22:29                 ` [Xen-devel] " Andrew Cooper
2015-01-22 20:58               ` Andy Lutomirski
2015-01-22 21:07           ` Paul E. McKenney
2015-01-22 21:07           ` [Xen-devel] " Paul E. McKenney
2015-01-22 18:39       ` Luis R. Rodriguez
2015-01-22 18:41     ` Luis R. Rodriguez
2015-01-22 18:41     ` [Xen-devel] " Luis R. Rodriguez
2015-01-22 13:10   ` Julien Grall
2015-01-22 13:10   ` [Xen-devel] " Julien Grall
2015-01-22 18:56     ` Luis R. Rodriguez
2015-01-22 20:31       ` Julien Grall
2015-01-22 20:31       ` [Xen-devel] " Julien Grall
2015-01-22 18:56     ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.