ia64/xen-unstable

changeset 19577:7809e0941b38

x86 vtd: Do not exclude freed percpu areas from dom0 vtd tables.

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Apr 25 08:19:14 2009 +0100 (2009-04-25)
parents ce273aa880e5
children 9fdcd3ab84b7
files xen/arch/x86/setup.c xen/arch/x86/tboot.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Fri Apr 24 17:51:56 2009 +0100
     1.2 +++ b/xen/arch/x86/setup.c	Sat Apr 25 08:19:14 2009 +0100
     1.3 @@ -1124,8 +1124,7 @@ int xen_in_range(paddr_t start, paddr_t 
     1.4      /* initialize first time */
     1.5      if ( !xen_regions[0].s )
     1.6      {
     1.7 -        extern char __init_begin[], __per_cpu_start[], __per_cpu_end[],
     1.8 -                    __bss_start[];
     1.9 +        extern char __init_begin[], __bss_start[];
    1.10          extern unsigned long allocator_bitmap_end;
    1.11  
    1.12          /* S3 resume code (and other real mode trampoline code) */
    1.13 @@ -1136,7 +1135,8 @@ int xen_in_range(paddr_t start, paddr_t 
    1.14          xen_regions[1].e = __pa(&__init_begin);
    1.15          /* per-cpu data */
    1.16          xen_regions[2].s = __pa(&__per_cpu_start);
    1.17 -        xen_regions[2].e = __pa(&__per_cpu_end);
    1.18 +        xen_regions[2].e = xen_regions[2].s +
    1.19 +            (((paddr_t)last_cpu(cpu_possible_map) + 1) << PERCPU_SHIFT);
    1.20          /* bss + boot allocator bitmap */
    1.21          xen_regions[3].s = __pa(&__bss_start);
    1.22          xen_regions[3].e = allocator_bitmap_end;
     2.1 --- a/xen/arch/x86/tboot.c	Fri Apr 24 17:51:56 2009 +0100
     2.2 +++ b/xen/arch/x86/tboot.c	Sat Apr 25 08:19:14 2009 +0100
     2.3 @@ -46,7 +46,7 @@ static uint64_t sinit_base, sinit_size;
     2.4  #define TXTCR_HEAP_BASE             0x0300
     2.5  #define TXTCR_HEAP_SIZE             0x0308
     2.6  
     2.7 -extern char __init_begin[], __per_cpu_start[], __per_cpu_end[], __bss_start[];
     2.8 +extern char __init_begin[], __per_cpu_start[], __bss_start[];
     2.9  extern unsigned long allocator_bitmap_end;
    2.10  
    2.11  #define SHA1_SIZE      20
    2.12 @@ -310,8 +310,9 @@ void tboot_shutdown(uint32_t shutdown_ty
    2.13                                                __pa(&_stext);
    2.14          /* per-cpu data */
    2.15          g_tboot_shared->mac_regions[2].start = (uint64_t)__pa(&__per_cpu_start);
    2.16 -        g_tboot_shared->mac_regions[2].size = __pa(&__per_cpu_end) -
    2.17 -                                              __pa(&__per_cpu_start);
    2.18 +        g_tboot_shared->mac_regions[2].size =
    2.19 +            g_tboot_shared->mac_regions[2].start +
    2.20 +            (((uint64_t)last_cpu(cpu_possible_map) + 1) << PERCPU_SHIFT);
    2.21          /* bss */
    2.22          g_tboot_shared->mac_regions[3].start = (uint64_t)__pa(&__bss_start);
    2.23          g_tboot_shared->mac_regions[3].size = __pa(&_end) - __pa(&__bss_start);