All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: keir.fraser@eu.citrix.com
Subject: [PATCH] switch to a known good/static GDT before kexec
Date: Thu, 02 Jul 2009 09:45:06 +0100	[thread overview]
Message-ID: <31002ac6a13caadab7c1.1246524306@localhost.localdomain> (raw)

# 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) )
     {

             reply	other threads:[~2009-07-02  8:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  8:45 Ian Campbell [this message]
2009-07-02  9:18 ` [PATCH] switch to a known good/static GDT before kexec 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31002ac6a13caadab7c1.1246524306@localhost.localdomain \
    --to=ian.campbell@citrix.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.