All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v2 0/6] x86: fixes/improvements for scratch cpumask
@ 2020-02-17 18:43 Roger Pau Monne
  2020-02-17 18:43 ` [Xen-devel] [PATCH v2 1/6] x86/smp: unify header includes in smp.h Roger Pau Monne
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: Roger Pau Monne @ 2020-02-17 18:43 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Jan Beulich,
	Roger Pau Monne

Hello,

Commit:

5500d265a2a8fa63d60c08beb549de8ec82ff7a5
x86/smp: use APIC ALLBUT destination shorthand when possible

Introduced a bogus usage of the scratch cpumask: it was used in a
function that could be called from interrupt context, and hence using
the scratch cpumask there is not safe. Patch #5 is a fix for that usage,
together with also preventing the usage of any per-CPU variables when
send_IPI_mask is called from #MC or #NMI context. Previous patches are
preparatory changes.

Patch #6 adds some debug infrastructure to make sure the scratch cpumask
is used in the right context, and hence should prevent further missuses.

Thanks, Roger.

Roger Pau Monne (6):
  x86/smp: unify header includes in smp.h
  x86: introduce a nmi_count tracking variable
  x86: track when in #MC context
  x86: track when in #NMI context
  x86/smp: use a dedicated scratch cpumask in send_IPI_mask
  x86: add accessors for scratch cpu mask

 xen/arch/x86/cpu/mcheck/mce.c |  2 ++
 xen/arch/x86/io_apic.c        |  6 +++--
 xen/arch/x86/irq.c            | 13 ++++++---
 xen/arch/x86/mm.c             | 30 ++++++++++++++-------
 xen/arch/x86/msi.c            |  4 ++-
 xen/arch/x86/nmi.c            | 11 ++++----
 xen/arch/x86/smp.c            | 51 ++++++++++++++++++++++++++++++++++-
 xen/arch/x86/smpboot.c        | 10 +++++--
 xen/arch/x86/traps.c          | 10 ++++++-
 xen/include/asm-x86/hardirq.h | 23 +++++++++++++++-
 xen/include/asm-x86/nmi.h     |  2 ++
 xen/include/asm-x86/smp.h     | 15 ++++++++---
 xen/include/xen/irq_cpustat.h |  1 +
 13 files changed, 148 insertions(+), 30 deletions(-)

-- 
2.25.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2020-02-18 16:33 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 18:43 [Xen-devel] [PATCH v2 0/6] x86: fixes/improvements for scratch cpumask Roger Pau Monne
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 1/6] x86/smp: unify header includes in smp.h Roger Pau Monne
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 2/6] x86: introduce a nmi_count tracking variable Roger Pau Monne
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 3/6] x86: track when in #MC context Roger Pau Monne
2020-02-17 19:29   ` Julien Grall
2020-02-18  9:45     ` Roger Pau Monné
2020-02-18  9:48     ` Roger Pau Monné
2020-02-18 11:20       ` Julien Grall
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 4/6] x86: track when in #NMI context Roger Pau Monne
2020-02-18 10:40   ` Andrew Cooper
2020-02-18 10:59     ` Roger Pau Monné
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 5/6] x86/smp: use a dedicated scratch cpumask in send_IPI_mask Roger Pau Monne
2020-02-18 10:53   ` Andrew Cooper
2020-02-18 11:10     ` Roger Pau Monné
2020-02-18 11:21       ` Andrew Cooper
2020-02-18 11:22         ` Roger Pau Monné
2020-02-18 11:35           ` Andrew Cooper
2020-02-18 11:46             ` Roger Pau Monné
2020-02-18 13:29               ` Andrew Cooper
2020-02-18 14:43                 ` Roger Pau Monné
2020-02-18 15:34                   ` Andrew Cooper
2020-02-18 15:40                     ` Jan Beulich
2020-02-18 16:18                       ` Roger Pau Monné
2020-02-18 16:33                         ` Jan Beulich
2020-02-18 11:28         ` Jan Beulich
2020-02-18 11:44           ` Andrew Cooper
2020-02-17 18:43 ` [Xen-devel] [PATCH v2 6/6] x86: add accessors for scratch cpu mask Roger Pau Monne
2020-02-18  7:40 ` [Xen-devel] [PATCH v2 0/6] x86: fixes/improvements for scratch cpumask Jürgen Groß
2020-02-18 10:15   ` Roger Pau Monné
2020-02-18 10:46     ` Jürgen Groß
2020-02-18 10:26   ` Andrew Cooper
2020-02-18 10:54     ` Jürgen Groß

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.