--- old-xen-build/tools/libxc/xc_linux_build.c 2005-06-09 21:15:17.000000000 +0000 +++ new-xen-build/tools/libxc/xc_linux_build.c 2005-06-19 00:45:58.000000000 +0000 @@ -145,8 +145,7 @@ static int setup_guest(int xc_handle, if ( (((v_end - dsi.v_start + ((1<> L2_PAGETABLE_SHIFT) + 1) <= nr_pt_pages ) break; -#endif -#if defined(__x86_64__) +#elif defined(__x86_64__) #define NR(_l,_h,_s) \ (((((_h) + ((1UL<<(_s))-1)) & ~((1UL<<(_s))-1)) - \ ((_l) & ~((1UL<<(_s))-1))) >> (_s)) @@ -263,8 +262,7 @@ static int setup_guest(int xc_handle, } munmap(vl1tab, PAGE_SIZE); munmap(vl2tab, PAGE_SIZE); -#endif -#if defined(__x86_64__) +#elif defined(__x86_64__) #define alloc_pt(ltab, vltab) \ ltab = page_array[ppt_alloc++] << PAGE_SHIFT; \ @@ -288,7 +286,7 @@ static int setup_guest(int xc_handle, if ( (vl4tab = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, l4tab >> PAGE_SHIFT)) == NULL ) - goto error_out; + goto error_out; memset(vl4tab, 0, PAGE_SIZE); vl4e = &vl4tab[l4_table_offset(dsi.v_start)]; @@ -296,34 +294,33 @@ static int setup_guest(int xc_handle, { if ( !((unsigned long)vl1e & (PAGE_SIZE-1)) ) { - alloc_pt(l1tab, vl1tab); + alloc_pt(l1tab, vl1tab); - if ( !((unsigned long)vl2e & (PAGE_SIZE-1)) ) - { - alloc_pt(l2tab, vl2tab); - if ( !((unsigned long)vl3e & (PAGE_SIZE-1)) ) - { - alloc_pt(l3tab, vl3tab); - vl3e = &vl3tab[l3_table_offset(dsi.v_start + (count<= ((vpt_start-dsi.v_start)>>PAGE_SHIFT)) && (count < ((vpt_end -dsi.v_start)>>PAGE_SHIFT)) ) { - *vl1e &= ~_PAGE_RW; + *vl1e &= ~_PAGE_RW; } - vl1e++; + vl1e++; } munmap(vl1tab, PAGE_SIZE); @@ -364,11 +361,10 @@ static int setup_guest(int xc_handle, */ if ( pin_table(xc_handle, MMUEXT_PIN_L2_TABLE, l2tab>>PAGE_SHIFT, dom) ) goto error_out; -#endif -#if defined(__x86_64__) +#elif defined(__x86_64__) /* - * Pin down l4tab addr as page dir page - causes hypervisor to provide + * Pin down l4tab addr as page dir page - causes hypervisor to provide * correct protection for the page */ if ( pin_table(xc_handle, MMUEXT_PIN_L4_TABLE, l4tab>>PAGE_SHIFT, dom) )