All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] switch to a known good/static GDT before kexec
@ 2009-07-02  8:45 Ian Campbell
  2009-07-02  9:18 ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2009-07-02  8:45 UTC (permalink / raw)
  To: xen-devel; +Cc: keir.fraser

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1246524221 -3600
# Node ID 31002ac6a13caadab7c163d387af558a2b2da7ce
# Parent  8e18dd41c6c7bb0980b29393b275c564cfb96437
switch to a known good/static GDT before kexec

kexec has been failing (at least on 32on64, didn't try others) since
18771:8e18dd41c6c7 "x86: reduce GDT switching". Ensure that we are
using a known good GDT before attempting to switch to compatability mode.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 8e18dd41c6c7 -r 31002ac6a13c xen/arch/x86/machine_kexec.c
--- a/xen/arch/x86/machine_kexec.c	Wed Nov 12 12:01:35 2008 +0000
+++ b/xen/arch/x86/machine_kexec.c	Thu Jul 02 09:43:41 2009 +0100
@@ -115,6 +115,13 @@
 
 void machine_kexec(xen_kexec_image_t *image)
 {
+    struct desc_ptr gdt_desc = {
+        .base = (unsigned long)(boot_cpu_gdt_table - FIRST_RESERVED_GDT_ENTRY),
+        .limit = LAST_RESERVED_GDT_BYTE
+    };
+
+    asm volatile ( "lgdt %0" : : "m" (gdt_desc) );
+
 #ifdef CONFIG_COMPAT
     if ( is_pv_32on64_domain(dom0) )
     {

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

end of thread, other threads:[~2009-07-03  7:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02  8:45 [PATCH] switch to a known good/static GDT before kexec Ian Campbell
2009-07-02  9:18 ` Keir Fraser
2009-07-02 10:52   ` Keir Fraser
2009-07-02 11:11     ` Keir Fraser
2009-07-02 11:45       ` Re: [PATCH] switch to a known good/static GDT beforekexec Jan Beulich
2009-07-02 12:38         ` Keir Fraser
2009-07-02 19:59           ` Keir Fraser
2009-07-03  7:15             ` Re: [PATCH] switch to a known good/static GDTbeforekexec Jan Beulich
2009-07-03  7:48               ` Keir Fraser

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.