WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] kexec: switch to a known good/static GDT

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] kexec: switch to a known good/static GDT before kexec
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Jul 2009 08:51:15 -0700
Delivery-date: Thu, 02 Jul 2009 08:57:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1246547775 -3600
# Node ID 863ae334467c44e939fed3a2a38c1af76451b94e
# Parent  653c2c5f4594958afe43c152ce0a899b17261388
kexec: 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@xxxxxxxxxx>
---
 xen/arch/x86/machine_kexec.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -r 653c2c5f4594 -r 863ae334467c xen/arch/x86/machine_kexec.c
--- a/xen/arch/x86/machine_kexec.c      Thu Jul 02 11:36:17 2009 +0100
+++ b/xen/arch/x86/machine_kexec.c      Thu Jul 02 16:16:15 2009 +0100
@@ -113,6 +113,18 @@ void machine_reboot_kexec(xen_kexec_imag
 
 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
+    };
+
+    /*
+     * compat_machine_kexec() returns to idle pagetables, which requires us
+     * to be running on a static GDT mapping (idle pagetables have no GDT
+     * mappings in their per-domain mapping area).
+     */
+    asm volatile ( "lgdt %0" : : "m" (gdt_desc) );
+
 #ifdef CONFIG_COMPAT
     if ( is_pv_32on64_domain(dom0) )
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] kexec: switch to a known good/static GDT before kexec, Xen patchbot-unstable <=