All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/Xen: swap NX determination and GDT setup on BSP
@ 2021-05-20 11:42 Jan Beulich
  2021-05-20 11:57 ` Juergen Gross
  2021-05-21  8:30 ` Juergen Gross
  0 siblings, 2 replies; 11+ messages in thread
From: Jan Beulich @ 2021-05-20 11:42 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky; +Cc: xen-devel

xen_setup_gdt(), via xen_load_gdt_boot(), wants to adjust page tables.
For this to work when NX is not available, x86_configure_nx() needs to
be called first.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -1273,16 +1273,16 @@ asmlinkage __visible void __init xen_sta
 	/* Get mfn list */
 	xen_build_dynamic_phys_to_machine();
 
+	/* Work out if we support NX */
+	get_cpu_cap(&boot_cpu_data);
+	x86_configure_nx();
+
 	/*
 	 * Set up kernel GDT and segment registers, mainly so that
 	 * -fstack-protector code can be executed.
 	 */
 	xen_setup_gdt(0);
 
-	/* Work out if we support NX */
-	get_cpu_cap(&boot_cpu_data);
-	x86_configure_nx();
-
 	/* Determine virtual and physical address sizes */
 	get_cpu_address_sizes(&boot_cpu_data);
 


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

end of thread, other threads:[~2021-05-21 13:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 11:42 [PATCH] x86/Xen: swap NX determination and GDT setup on BSP Jan Beulich
2021-05-20 11:57 ` Juergen Gross
2021-05-20 12:08   ` Jan Beulich
2021-05-20 12:18     ` Juergen Gross
2021-05-21  7:18     ` Juergen Gross
2021-05-21  7:26       ` Jan Beulich
2021-05-21  7:45         ` Juergen Gross
2021-05-21 13:12           ` Boris Ostrovsky
2021-05-21 13:15             ` Jan Beulich
2021-05-21 13:17               ` Boris Ostrovsky
2021-05-21  8:30 ` Juergen Gross

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.