Build fixes for current xen-unstable.hg. Boots dom0, but not domU. Signed-off-by: Alex Williamson --- diff -r 6a8204e4619d linux-2.6-xen-sparse/include/asm-ia64/page.h --- a/linux-2.6-xen-sparse/include/asm-ia64/page.h Mon Aug 21 13:36:05 2006 +0100 +++ b/linux-2.6-xen-sparse/include/asm-ia64/page.h Mon Aug 21 16:32:59 2006 -0600 @@ -221,12 +221,9 @@ get_order (unsigned long size) #ifndef __ASSEMBLY__ #ifdef CONFIG_XEN -#define INVALID_P2M_ENTRY (~0UL) - #include #include #include // to compile netback, netfront -typedef unsigned long maddr_t; // to compile netback, netfront /* * XXX hack! @@ -265,68 +262,7 @@ extern struct address_space xen_ia64_for }) #define HAVE_ARCH_FREE_PAGE -/* XXX xen page size != page size */ - -static inline unsigned long -pfn_to_mfn_for_dma(unsigned long pfn) -{ - unsigned long mfn; - mfn = HYPERVISOR_phystomach(pfn); - BUG_ON(mfn == 0); // XXX - BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX - BUG_ON(mfn == INVALID_MFN); - return mfn; -} - -static inline unsigned long -phys_to_machine_for_dma(unsigned long phys) -{ - unsigned long machine = - pfn_to_mfn_for_dma(phys >> PAGE_SHIFT) << PAGE_SHIFT; - machine |= (phys & ~PAGE_MASK); - return machine; -} - -static inline unsigned long -mfn_to_pfn_for_dma(unsigned long mfn) -{ - unsigned long pfn; - pfn = HYPERVISOR_machtophys(mfn); - BUG_ON(pfn == 0); - //BUG_ON(pfn == INVALID_M2P_ENTRY); - return pfn; -} - -static inline unsigned long -machine_to_phys_for_dma(unsigned long machine) -{ - unsigned long phys = - mfn_to_pfn_for_dma(machine >> PAGE_SHIFT) << PAGE_SHIFT; - phys |= (machine & ~PAGE_MASK); - return phys; -} - -#define set_phys_to_machine(pfn, mfn) do { } while (0) -#define xen_machphys_update(mfn, pfn) do { } while (0) - -/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ -#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) - -#define mfn_to_pfn(mfn) (mfn) -#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT)) -#define pfn_to_mfn(pfn) (pfn) -#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT) -#define virt_to_machine(virt) __pa(virt) // for tpmfront.c - -static inline unsigned long -mfn_to_local_pfn(unsigned long mfn) -{ - extern unsigned long max_mapnr; - unsigned long pfn = mfn_to_pfn_for_dma(mfn); - if (!pfn_valid(pfn)) - return INVALID_P2M_ENTRY; - return pfn; -} +#include #endif /* CONFIG_XEN */ #endif /* __ASSEMBLY__ */ diff -r 6a8204e4619d tools/libxc/ia64/xc_ia64_linux_save.c --- a/tools/libxc/ia64/xc_ia64_linux_save.c Mon Aug 21 13:36:05 2006 +0100 +++ b/tools/libxc/ia64/xc_ia64_linux_save.c Mon Aug 21 16:32:59 2006 -0600 @@ -79,7 +79,7 @@ static int xc_ia64_shadow_control(int xc } return xc_shadow_control(xc_handle, domid, sop, - dirty_bitmap, pages, stats); + dirty_bitmap, pages, NULL, 0, stats); } static inline ssize_t diff -r 6a8204e4619d tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Mon Aug 21 13:36:05 2006 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Mon Aug 21 16:32:59 2006 -0600 @@ -1285,17 +1285,22 @@ class XendDomainInfo: m = self.image.getDomainMemory(self.info['memory'] * 1024) - # get the domain's shadow memory requirement - sm = int(math.ceil(self.image.getDomainShadowMemory(m) / 1024.0)) - if self.info['shadow_memory'] > sm: - sm = self.info['shadow_memory'] + if os.uname()[4] not in ('ia64', 'ppc64'): + # get the domain's shadow memory requirement + sm = int(math.ceil(self.image.getDomainShadowMemory(m) / 1024.0)) + if self.info['shadow_memory'] > sm: + sm = self.info['shadow_memory'] + else: + # no shadow memory on ia64 and ppc + sm = 0 # Make sure there's enough RAM available for the domain balloon.free(m + sm * 1024) - # Set up the shadow memory - sm = xc.shadow_mem_control(self.domid, mb=sm) - self.info['shadow_memory'] = sm + if sm > 0: + # Set up the shadow memory + sm = xc.shadow_mem_control(self.domid, mb=sm) + self.info['shadow_memory'] = sm init_reservation = self.info['memory'] * 1024 if os.uname()[4] in ('ia64', 'ppc64'): diff -r 6a8204e4619d xen/include/asm-ia64/grant_table.h --- a/xen/include/asm-ia64/grant_table.h Mon Aug 21 13:36:05 2006 +0100 +++ b/xen/include/asm-ia64/grant_table.h Mon Aug 21 16:32:59 2006 -0600 @@ -35,7 +35,7 @@ void guest_physmap_add_page(struct domai gnttab_shared_maddr((d), (t), (i))); \ (IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) + (i);}) -#define gnttab_log_dirty(d, f) ((void)0) +#define gnttab_mark_dirty(d, f) ((void)0) static inline void gnttab_clear_flag(unsigned long nr, uint16_t *addr) { diff -r 6a8204e4619d linux-2.6-xen-sparse/include/asm-ia64/maddr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h Mon Aug 21 16:32:59 2006 -0600 @@ -0,0 +1,81 @@ +#ifndef _ASM_IA64_MADDR_H +#define _ASM_IA64_MADDR_H + +#ifndef __ASSEMBLY__ +#ifdef CONFIG_XEN + +#define INVALID_P2M_ENTRY (~0UL) + +#include +#include +#include // to compile netback, netfront +typedef unsigned long maddr_t; // to compile netback, netfront + + +/* XXX xen page size != page size */ + +static inline unsigned long +pfn_to_mfn_for_dma(unsigned long pfn) +{ + unsigned long mfn; + mfn = HYPERVISOR_phystomach(pfn); + BUG_ON(mfn == 0); // XXX + BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX + BUG_ON(mfn == INVALID_MFN); + return mfn; +} + +static inline unsigned long +phys_to_machine_for_dma(unsigned long phys) +{ + unsigned long machine = + pfn_to_mfn_for_dma(phys >> PAGE_SHIFT) << PAGE_SHIFT; + machine |= (phys & ~PAGE_MASK); + return machine; +} + +static inline unsigned long +mfn_to_pfn_for_dma(unsigned long mfn) +{ + unsigned long pfn; + pfn = HYPERVISOR_machtophys(mfn); + BUG_ON(pfn == 0); + //BUG_ON(pfn == INVALID_M2P_ENTRY); + return pfn; +} + +static inline unsigned long +machine_to_phys_for_dma(unsigned long machine) +{ + unsigned long phys = + mfn_to_pfn_for_dma(machine >> PAGE_SHIFT) << PAGE_SHIFT; + phys |= (machine & ~PAGE_MASK); + return phys; +} + +#define set_phys_to_machine(pfn, mfn) do { } while (0) +#define xen_machphys_update(mfn, pfn) do { } while (0) + +/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ +#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) + +#define mfn_to_pfn(mfn) (mfn) +#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT)) +#define pfn_to_mfn(pfn) (pfn) +#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT) +#define virt_to_machine(virt) __pa(virt) // for tpmfront.c + +static inline unsigned long +mfn_to_local_pfn(unsigned long mfn) +{ + extern unsigned long max_mapnr; + unsigned long pfn = mfn_to_pfn_for_dma(mfn); + if (!pfn_valid(pfn)) + return INVALID_P2M_ENTRY; + return pfn; +} + +#endif /* CONFIG_XEN */ +#endif /* __ASSEMBLY__ */ + +#endif /* _ASM_IA64_MADDR_H */