All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64,xen,espfix: Initialize espfix on secondary CPUs
@ 2014-07-15 15:26 Andy Lutomirski
  2014-07-15 15:38 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 10+ messages in thread
From: Andy Lutomirski @ 2014-07-15 15:26 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: boris.ostrovsky, linux-kernel, Konrad Rzeszutek Wilk,
	Andy Lutomirski, stable

Xen doesn't call start_secondary.

Cc: stable@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---

espfix still doesn't seem to work on Xen (it goes boom in some way that
I don't understand right now), but initializing all CPUs instead of just
one of them seems like a good start.

ISTM the right fix is probably to shove the espfix logic into
native_iret and to tweak the paravirt logic so that native_iret always
gets invoked.  I suspect that Xen will need its own implementation of
espfix64 in the hypervisor and that, ultimately, someone may want to
stop initializing espfix64 at all on Xen guests.

 arch/x86/xen/smp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 7005974..eea9bcc 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -23,6 +23,7 @@
 #include <asm/desc.h>
 #include <asm/pgtable.h>
 #include <asm/cpu.h>
+#include <asm/espfix.h>
 
 #include <xen/interface/xen.h>
 #include <xen/interface/vcpu.h>
@@ -85,6 +86,13 @@ static void cpu_bringup(void)
 
 	xen_setup_cpu_clockevents();
 
+	/*
+	 * Enable the espfix hack for this CPU
+	 */
+#ifdef CONFIG_X86_ESPFIX64
+	init_espfix_ap();
+#endif
+
 	notify_cpu_starting(cpu);
 
 	set_cpu_online(cpu, true);
-- 
1.9.3


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

end of thread, other threads:[~2014-07-15 16:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 15:26 [PATCH] x86_64,xen,espfix: Initialize espfix on secondary CPUs Andy Lutomirski
2014-07-15 15:38 ` Konrad Rzeszutek Wilk
2014-07-15 15:44   ` Andy Lutomirski
2014-07-15 15:56     ` Konrad Rzeszutek Wilk
2014-07-15 15:45   ` Boris Ostrovsky
2014-07-15 15:54     ` Andy Lutomirski
2014-07-15 16:05       ` Boris Ostrovsky
2014-07-15 16:17         ` Andy Lutomirski
2014-07-15 15:50   ` H. Peter Anvin
2014-07-15 16:00     ` Andy Lutomirski

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.