[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] pickled code fix
# HG changeset patch # User awilliam@xxxxxxxxxxx # Node ID 1824ee11fc537dcbaf960fce786757b64fbb5d51 # Parent 432f978d1cd1351c5da6b5b15ff516ec9c07fa3c [IA64] pickled code fix Do the pickling based on xen_heap_start, rather than __va/__pa. The __va/__pa approach doesn't work as some systems do not have their heap located within the 4GB window. Signed-off-by: Jes Sorensen <jes@xxxxxxx> --- xen/arch/ia64/xen/xensetup.c | 16 ++++++++-------- xen/include/asm-ia64/mm.h | 10 +++++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff -r 432f978d1cd1 -r 1824ee11fc53 xen/arch/ia64/xen/xensetup.c --- a/xen/arch/ia64/xen/xensetup.c Sun Sep 24 13:10:13 2006 -0600 +++ b/xen/arch/ia64/xen/xensetup.c Sun Sep 24 14:01:35 2006 -0600 @@ -84,6 +84,7 @@ unsigned long xenheap_size = XENHEAP_DEF unsigned long xenheap_size = XENHEAP_DEFAULT_SIZE; extern long running_on_sim; unsigned long xen_pstart; +void *xen_heap_start; static int xen_count_pages(u64 start, u64 end, void *arg) @@ -245,7 +246,6 @@ void start_kernel(void) void start_kernel(void) { char *cmdline; - void *heap_start; unsigned long nr_pages; unsigned long dom0_memory_start, dom0_memory_size; unsigned long dom0_initrd_start, dom0_initrd_size; @@ -392,10 +392,10 @@ void start_kernel(void) printf("find_memory: efi_memmap_walk returns max_page=%lx\n",max_page); efi_print(); - heap_start = memguard_init(ia64_imva(&_end)); - printf("Before heap_start: %p\n", heap_start); - heap_start = __va(init_boot_allocator(__pa(heap_start))); - printf("After heap_start: %p\n", heap_start); + xen_heap_start = memguard_init(ia64_imva(&_end)); + printf("Before xen_heap_start: %p\n", xen_heap_start); + xen_heap_start = __va(init_boot_allocator(__pa(xen_heap_start))); + printf("After xen_heap_start: %p\n", xen_heap_start); efi_memmap_walk(filter_rsvd_memory, init_boot_pages); efi_memmap_walk(xen_count_pages, &nr_pages); @@ -413,10 +413,10 @@ void start_kernel(void) end_boot_allocator(); - init_xenheap_pages(__pa(heap_start), xenheap_phys_end); + init_xenheap_pages(__pa(xen_heap_start), xenheap_phys_end); printk("Xen heap: %luMB (%lukB)\n", - (xenheap_phys_end-__pa(heap_start)) >> 20, - (xenheap_phys_end-__pa(heap_start)) >> 10); + (xenheap_phys_end-__pa(xen_heap_start)) >> 20, + (xenheap_phys_end-__pa(xen_heap_start)) >> 10); late_setup_arch(&cmdline); diff -r 432f978d1cd1 -r 1824ee11fc53 xen/include/asm-ia64/mm.h --- a/xen/include/asm-ia64/mm.h Sun Sep 24 13:10:13 2006 -0600 +++ b/xen/include/asm-ia64/mm.h Sun Sep 24 14:01:35 2006 -0600 @@ -117,10 +117,14 @@ struct page_info #define IS_XEN_HEAP_FRAME(_pfn) ((page_to_maddr(_pfn) < xenheap_phys_end) \ && (page_to_maddr(_pfn) >= xen_pstart)) -static inline struct domain *unpickle_domptr(u32 _d) -{ return (_d == 0) ? NULL : __va(_d); } +extern void *xen_heap_start; +#define __pickle(a) ((unsigned long)a - (unsigned long)xen_heap_start) +#define __unpickle(a) (void *)(a + xen_heap_start) + +static inline struct domain *unpickle_domptr(u64 _d) +{ return (_d == 0) ? NULL : __unpickle(_d); } static inline u32 pickle_domptr(struct domain *_d) -{ return (_d == NULL) ? 0 : (u32)__pa(_d); } +{ return (_d == NULL) ? 0 : (u32)__pickle(_d); } #define page_get_owner(_p) (unpickle_domptr((_p)->u.inuse._domain)) #define page_set_owner(_p, _d) ((_p)->u.inuse._domain = pickle_domptr(_d)) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |