Fix the IA64 build of the hypervisor. This is completely untested, beyond confirming that it compiles. Signed-off-by: Steven Smith diff -r 1d7221667204 xen/arch/ia64/xen/mm.c --- a/xen/arch/ia64/xen/mm.c Thu Oct 08 09:24:32 2009 +0100 +++ b/xen/arch/ia64/xen/mm.c Thu Oct 08 18:55:38 2009 +0100 @@ -3335,7 +3335,7 @@ gnttab_grow_table(d, xatp.idx + 1); if (xatp.idx < nr_grant_frames(d->grant_table)) - mfn = virt_to_mfn(d->grant_table->shared[xatp.idx]); + mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]); spin_unlock(&d->grant_table->lock); break; diff -r 1d7221667204 xen/common/grant_table.c --- a/xen/common/grant_table.c Thu Oct 08 09:24:32 2009 +0100 +++ b/xen/common/grant_table.c Thu Oct 08 18:55:38 2009 +0100 @@ -1754,7 +1754,7 @@ blocks mappings of transitive grants. */ is_sub_page = 1; *owning_domain = rrd; - act->gfn = INVALID_GFN; + act->gfn = -1ul; } else if ( sha1 ) { diff -r 1d7221667204 xen/include/asm-ia64/grant_table.h --- a/xen/include/asm-ia64/grant_table.h Thu Oct 08 09:24:32 2009 +0100 +++ b/xen/include/asm-ia64/grant_table.h Thu Oct 08 18:55:38 2009 +0100 @@ -31,8 +31,12 @@ /* Guest physical address of the grant table. */ #define IA64_GRANT_TABLE_PADDR IA64_XMAPPEDREGS_PADDR(NR_CPUS) -#define gnttab_shared_maddr(t, i) (virt_to_maddr((t)->shared[(i)])) -#define gnttab_shared_page(t, i) (virt_to_page((t)->shared[(i)])) +#define gnttab_shared_maddr(t, i) (virt_to_maddr((t)->shared_raw[(i)])) +#define gnttab_shared_page(t, i) (virt_to_page((t)->shared_raw[(i)])) + +#define gnttab_status_maddr(t, i) (virt_to_maddr((t)->status[(i)])) +#define gnttab_status_mfn(t, i) (virt_to_maddr((t)->status[(i)]) >> PAGE_SHIFT) +#define gnttab_status_page(t, i) (virt_to_page((t)->status[(i)])) #define ia64_gnttab_create_shared_page(d, t, i) \ do { \ @@ -55,8 +59,26 @@ ia64_gnttab_create_shared_page((d), (t), (i)); \ } while (0) +#define ia64_gnttab_create_status_page(d, t, i) \ + do { \ + BUG_ON((d)->arch.mm.pgd == NULL); \ + assign_domain_page((d), \ + IA64_GRANT_TABLE_PADDR + ((i) << PAGE_SHIFT), \ + gnttab_status_maddr((t), (i))); \ + } while (0) + +#define gnttab_create_status_page(d, t, i) \ + do { \ + share_xen_page_with_guest(gnttab_status_page((t), (i)), \ + (d), XENSHARE_writable); \ + if ((d)->arch.mm.pgd) \ + ia64_gnttab_create_status_page((d), (t), (i)); \ + } while (0) + #define gnttab_shared_gmfn(d, t, i) \ ((IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) + (i)) +#define gnttab_status_gmfn(d, t, i) \ + (mfn_to_gmfn(d, gnttab_status_mfn(t, i))) #define gnttab_mark_dirty(d, f) ((void)f) diff -r 1d7221667204 xen/include/asm-x86/grant_table.h --- a/xen/include/asm-x86/grant_table.h Thu Oct 08 09:24:32 2009 +0100 +++ b/xen/include/asm-x86/grant_table.h Thu Oct 08 18:55:38 2009 +0100 @@ -44,7 +44,7 @@ ((virt_to_maddr((t)->status[i]) >> PAGE_SHIFT)) #define gnttab_status_gmfn(d, t, i) \ - (mfn_to_gmfn(d, gnttab_status_mfn(d, t, i))) + (mfn_to_gmfn(d, gnttab_status_mfn(t, i))) #define gnttab_mark_dirty(d, f) paging_mark_dirty((d), (f))