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] Work around internal error in some versions of x86/64 gc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Work around internal error in some versions of x86/64 gcc
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Oct 2005 18:54:26 +0000
Delivery-date: Fri, 21 Oct 2005 18:53:42 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c3a0f492644cf3288e4144d85d73efc831d7333f
# Parent  899f7b4b19fc364a83650b1e2466393a7bb08ba6
Work around internal error in some versions of x86/64 gcc
by manually hoisting gdt address calculation outside loop.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 899f7b4b19fc -r c3a0f492644c xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Oct 21 09:46:30 2005
+++ b/xen/arch/x86/domain.c     Fri Oct 21 10:29:51 2005
@@ -254,6 +254,7 @@
 void arch_do_createdomain(struct vcpu *v)
 {
     struct domain *d = v->domain;
+    l1_pgentry_t gdt_l1e;
     int vcpuid;
 
     if ( is_idle_task(d) )
@@ -282,12 +283,10 @@
      * GDT, and the old VCPU# is invalid in the new domain, we would otherwise
      * try to load CS from an invalid table.
      */
+    gdt_l1e = l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR);
     for ( vcpuid = 0; vcpuid < MAX_VIRT_CPUS; vcpuid++ )
-    {
         d->arch.mm_perdomain_pt[
-            (vcpuid << PDPT_VCPU_SHIFT) + FIRST_RESERVED_GDT_PAGE] =
-            l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR);
-    }
+            (vcpuid << PDPT_VCPU_SHIFT) + FIRST_RESERVED_GDT_PAGE] = gdt_l1e;
 
     v->arch.guest_vtable  = __linear_l2_table;
     v->arch.shadow_vtable = __shadow_linear_l2_table;
diff -r 899f7b4b19fc -r c3a0f492644c xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Fri Oct 21 09:46:30 2005
+++ b/xen/arch/x86/setup.c      Fri Oct 21 10:29:51 2005
@@ -141,7 +141,7 @@
 static void __init start_of_day(void)
 {
     int i;
-    unsigned long vgdt;
+    unsigned long vgdt, gdt_pfn;
 
     early_cpu_init();
 
@@ -164,10 +164,10 @@
      * noted in arch_do_createdomain(), we must map for every possible VCPU#.
      */
     vgdt = GDT_VIRT_START(current) + FIRST_RESERVED_GDT_BYTE;
+    gdt_pfn = virt_to_phys(gdt_table) >> PAGE_SHIFT;
     for ( i = 0; i < MAX_VIRT_CPUS; i++ )
     {
-        map_pages_to_xen(
-            vgdt, virt_to_phys(gdt_table) >> PAGE_SHIFT, 1, PAGE_HYPERVISOR);
+        map_pages_to_xen(vgdt, gdt_pfn, 1, PAGE_HYPERVISOR);
         vgdt += 1 << PDPT_VCPU_VA_SHIFT;
     }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Work around internal error in some versions of x86/64 gcc, Xen patchbot -unstable <=