diff -r 15d378281a0b linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c Sat Aug 27 11:49:35 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c Sun Aug 28 11:05:15 2005 @@ -149,7 +149,7 @@ pmd_t *pmd; pte_t *pte; - pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id()); + pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id()); pgd += pgd_index(address); printk("PGD %lx ", pgd_val(*pgd)); @@ -296,9 +296,9 @@ #define MEM_VERBOSE 1 #ifdef MEM_VERBOSE -#define MEM_LOG(_f, _a...) \ - printk("fault.c:[%d]-> " _f "\n", \ - __LINE__ , ## _a ) +#define MEM_LOG(_f, _a...) \ + printk("fault.c:[%d]-> " _f "\n", \ + __LINE__ , ## _a ) #else #define MEM_LOG(_f, _a...) ((void)0) #endif @@ -325,7 +325,7 @@ siginfo_t info; if (!user_mode(regs)) - error_code &= ~4; /* means kernel */ + error_code &= ~4; /* means kernel */ #ifdef CONFIG_CHECKING { diff -r 15d378281a0b xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c Sat Aug 27 11:49:35 2005 +++ b/xen/arch/x86/domain.c Sun Aug 28 11:05:15 2005 @@ -255,13 +255,13 @@ v->vcpu_info = &d->shared_info->vcpu_data[v->vcpu_id]; v->cpumap = CPUMAP_RUNANYWHERE; SHARE_PFN_WITH_DOMAIN(virt_to_page(d->shared_info), d); - machine_to_phys_mapping[virt_to_phys(d->shared_info) >> - PAGE_SHIFT] = INVALID_M2P_ENTRY; + set_machinetophys(virt_to_phys(d->shared_info) >> + PAGE_SHIFT, INVALID_M2P_ENTRY); d->arch.mm_perdomain_pt = alloc_xenheap_page(); memset(d->arch.mm_perdomain_pt, 0, PAGE_SIZE); - machine_to_phys_mapping[virt_to_phys(d->arch.mm_perdomain_pt) >> - PAGE_SHIFT] = INVALID_M2P_ENTRY; + set_machinetophys(virt_to_phys(d->arch.mm_perdomain_pt) >> + PAGE_SHIFT, INVALID_M2P_ENTRY); v->arch.perdomain_ptes = d->arch.mm_perdomain_pt; v->arch.perdomain_ptes[FIRST_RESERVED_GDT_PAGE] = l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR); diff -r 15d378281a0b xen/arch/x86/domain_build.c --- a/xen/arch/x86/domain_build.c Sat Aug 27 11:49:35 2005 +++ b/xen/arch/x86/domain_build.c Sun Aug 28 11:05:15 2005 @@ -614,7 +614,7 @@ mfn = alloc_epfn - (pfn - REVERSE_START); #endif ((u32 *)vphysmap_start)[pfn] = mfn; - machine_to_phys_mapping[mfn] = pfn; + set_machinetophys(mfn, pfn); } while ( pfn < nr_pages ) { @@ -627,7 +627,7 @@ #define pfn (nr_pages - 1 - (pfn - (alloc_epfn - alloc_spfn))) #endif ((u32 *)vphysmap_start)[pfn] = mfn; - machine_to_phys_mapping[mfn] = pfn; + set_machinetophys(mfn, pfn); #undef pfn page++; pfn++; } diff -r 15d378281a0b xen/common/grant_table.c --- a/xen/common/grant_table.c Sat Aug 27 11:49:35 2005 +++ b/xen/common/grant_table.c Sun Aug 28 11:05:15 2005 @@ -1211,7 +1211,7 @@ DPRINTK("Bad pfn (%lx)\n", pfn); else { - machine_to_phys_mapping[frame] = pfn; + set_machinetophys(frame, pfn); if ( unlikely(shadow_mode_log_dirty(ld))) mark_dirty(ld, frame); @@ -1268,8 +1268,8 @@ { SHARE_PFN_WITH_DOMAIN( virt_to_page((char *)(t->shared)+(i*PAGE_SIZE)), d); - machine_to_phys_mapping[(virt_to_phys(t->shared) >> PAGE_SHIFT) + i] = - INVALID_M2P_ENTRY; + set_machinetophys((virt_to_phys(t->shared) >> PAGE_SHIFT) + i, + INVALID_M2P_ENTRY); } /* Okay, install the structure. */