diff -rN -u -p old-xen-unstable/xen/arch/x86/x86_32/domain_page.c new-xen-unstable/xen/arch/x86/x86_32/domain_page.c --- old-xen-unstable/xen/arch/x86/x86_32/domain_page.c 2005-04-27 20:19:53.000000000 +0000 +++ new-xen-unstable/xen/arch/x86/x86_32/domain_page.c 2005-04-30 08:42:30.000000000 +0000 @@ -20,7 +20,7 @@ #include l1_pgentry_t *mapcache; -static unsigned int map_idx, epoch, shadow_epoch[NR_CPUS]; +static unsigned int map_idx = 0, epoch, shadow_epoch[NR_CPUS]; static spinlock_t map_lock = SPIN_LOCK_UNLOCKED; /* Use a spare PTE bit to mark entries ready for recycling. */ @@ -39,7 +39,7 @@ static void flush_all_ready_maps(void) } -void *map_domain_mem(unsigned long pa) +void *map_domain_mem(unsigned long long pa) { unsigned long va; unsigned int idx, cpu = smp_processor_id(); @@ -62,7 +62,7 @@ void *map_domain_mem(unsigned long pa) } do { - idx = map_idx = (map_idx + 1) & (MAPCACHE_ENTRIES - 1); + idx = map_idx = (map_idx + 2) & (MAPCACHE_ENTRIES - 1); if ( unlikely(idx == 0) ) { ASSERT(flush_count++ == 0); @@ -75,6 +75,7 @@ void *map_domain_mem(unsigned long pa) while ( l1e_get_flags(cache[idx]) & _PAGE_PRESENT ); cache[idx] = l1e_create_phys(pa, __PAGE_HYPERVISOR); + cache[idx + 1] = l1e_create_phys(pa + sizeof(u32), __PAGE_HYPERVISOR); spin_unlock(&map_lock); @@ -89,4 +90,5 @@ void unmap_domain_mem(void *va) ASSERT(va < (void *)MAPCACHE_VIRT_END); idx = ((unsigned long)va - MAPCACHE_VIRT_START) >> PAGE_SHIFT; l1e_add_flags(&mapcache[idx], READY_FOR_TLB_FLUSH); + l1e_add_flags(&mapcache[idx + 1], READY_FOR_TLB_FLUSH); } diff -rN -u -p old-xen-unstable/xen/include/asm-x86/x86_32/domain_page.h new-xen-unstable/xen/include/asm-x86/x86_32/domain_page.h --- old-xen-unstable/xen/include/asm-x86/x86_32/domain_page.h 2005-04-27 20:19:53.000000000 +0000 +++ new-xen-unstable/xen/include/asm-x86/x86_32/domain_page.h 2005-04-30 08:05:25.000000000 +0000 @@ -19,7 +19,7 @@ extern l1_pgentry_t *mapcache; * The entire page containing that VA is now accessible until a * corresponding call to unmap_domain_mem(). */ -extern void *map_domain_mem(unsigned long pa); +extern void *map_domain_mem(unsigned long long pa); /* * Pass a VA within a page previously mapped with map_domain_mem().