direct-io.hg
changeset 7452:c3a0f492644c
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@xensource.com>
by manually hoisting gdt address calculation outside loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Fri Oct 21 11:29:51 2005 +0100 (2005-10-21) |
parents | 899f7b4b19fc |
children | f31494465fb0 |
files | xen/arch/x86/domain.c xen/arch/x86/setup.c |
line diff
1.1 --- a/xen/arch/x86/domain.c Fri Oct 21 10:46:30 2005 +0100 1.2 +++ b/xen/arch/x86/domain.c Fri Oct 21 11:29:51 2005 +0100 1.3 @@ -254,6 +254,7 @@ void free_perdomain_pt(struct domain *d) 1.4 void arch_do_createdomain(struct vcpu *v) 1.5 { 1.6 struct domain *d = v->domain; 1.7 + l1_pgentry_t gdt_l1e; 1.8 int vcpuid; 1.9 1.10 if ( is_idle_task(d) ) 1.11 @@ -282,12 +283,10 @@ void arch_do_createdomain(struct vcpu *v 1.12 * GDT, and the old VCPU# is invalid in the new domain, we would otherwise 1.13 * try to load CS from an invalid table. 1.14 */ 1.15 + gdt_l1e = l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR); 1.16 for ( vcpuid = 0; vcpuid < MAX_VIRT_CPUS; vcpuid++ ) 1.17 - { 1.18 d->arch.mm_perdomain_pt[ 1.19 - (vcpuid << PDPT_VCPU_SHIFT) + FIRST_RESERVED_GDT_PAGE] = 1.20 - l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR); 1.21 - } 1.22 + (vcpuid << PDPT_VCPU_SHIFT) + FIRST_RESERVED_GDT_PAGE] = gdt_l1e; 1.23 1.24 v->arch.guest_vtable = __linear_l2_table; 1.25 v->arch.shadow_vtable = __shadow_linear_l2_table;
2.1 --- a/xen/arch/x86/setup.c Fri Oct 21 10:46:30 2005 +0100 2.2 +++ b/xen/arch/x86/setup.c Fri Oct 21 11:29:51 2005 +0100 2.3 @@ -141,7 +141,7 @@ static void __init do_initcalls(void) 2.4 static void __init start_of_day(void) 2.5 { 2.6 int i; 2.7 - unsigned long vgdt; 2.8 + unsigned long vgdt, gdt_pfn; 2.9 2.10 early_cpu_init(); 2.11 2.12 @@ -164,10 +164,10 @@ static void __init start_of_day(void) 2.13 * noted in arch_do_createdomain(), we must map for every possible VCPU#. 2.14 */ 2.15 vgdt = GDT_VIRT_START(current) + FIRST_RESERVED_GDT_BYTE; 2.16 + gdt_pfn = virt_to_phys(gdt_table) >> PAGE_SHIFT; 2.17 for ( i = 0; i < MAX_VIRT_CPUS; i++ ) 2.18 { 2.19 - map_pages_to_xen( 2.20 - vgdt, virt_to_phys(gdt_table) >> PAGE_SHIFT, 1, PAGE_HYPERVISOR); 2.21 + map_pages_to_xen(vgdt, gdt_pfn, 1, PAGE_HYPERVISOR); 2.22 vgdt += 1 << PDPT_VCPU_VA_SHIFT; 2.23 } 2.24