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-devel

[Xen-devel] [patch 3/5] i386-gdt-pda Update lguest to initialize gdt wit

To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>
Subject: [Xen-devel] [patch 3/5] i386-gdt-pda Update lguest to initialize gdt without pda
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 26 Mar 2007 17:21:32 -0700
Cc: virtualization@xxxxxxxxxxxxxx, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Linux Kernel <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 26 Mar 2007 17:33:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070327002129.240126099@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
---
 arch/i386/lguest/lguest.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

===================================================================
--- a/arch/i386/lguest/lguest.c
+++ b/arch/i386/lguest/lguest.c
@@ -34,7 +34,6 @@
 #include <asm/desc.h>
 #include <asm/setup.h>
 #include <asm/e820.h>
-#include <asm/pda.h>
 #include <asm/asm-offsets.h>
 #include <asm/mce.h>
 
@@ -449,12 +448,10 @@ static void lguest_power_off(void)
        hcall(LHCALL_CRASH, __pa("Power down"), 0, 0);
 }
 
-/* From head.S */
-extern void setup_pda(void);
-extern struct Xgt_desc_struct early_gdt_descr;
-
 static __attribute_used__ __init void lguest_init(void)
 {
+       struct Xgt_desc_struct gdt_desc;
+
        paravirt_ops.name = "lguest";
        paravirt_ops.paravirt_enabled = 1;
        paravirt_ops.kernel_rpl = 1;
@@ -513,10 +510,10 @@ static __attribute_used__ __init void lg
        /* We use top of mem for initial pagetables. */
        init_pg_tables_end = __pa(pg0);
 
-       /* set up PDA descriptor */
-       setup_pda();
-       load_gdt(&early_gdt_descr);
-       asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory");
+       /* set up gdt */
+       gdt_desc.address = (unsigned long)per_cpu__gdt_page.gdt;
+       gdt_desc.size = sizeof(struct gdt_page)-1;
+       load_gdt(&gdt_desc);
 
        reserve_top_address(lguest_data.reserve_mem);
 

-- 


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