# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1255074865 -3600
# Node ID 0f43f39ce6a9c6d3a3a0a35fbd53142efd775a23
# Parent 0e6c04748fd277909fd82e555c8bf5f8bf756ca1
Fix the IA64 build of the hypervisor.
This is completely untested, beyond confirming that it compiles.
Signed-off-by: Steven Smith <steven.smith@xxxxxxxxxx>
---
xen/arch/ia64/xen/mm.c | 2 +-
xen/common/grant_table.c | 2 +-
xen/include/asm-ia64/grant_table.h | 26 ++++++++++++++++++++++++--
xen/include/asm-x86/grant_table.h | 2 +-
4 files changed, 27 insertions(+), 5 deletions(-)
diff -r 0e6c04748fd2 -r 0f43f39ce6a9 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Fri Oct 09 08:53:42 2009 +0100
+++ b/xen/arch/ia64/xen/mm.c Fri Oct 09 08:54:25 2009 +0100
@@ -3335,7 +3335,7 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
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 0e6c04748fd2 -r 0f43f39ce6a9 xen/common/grant_table.c
--- a/xen/common/grant_table.c Fri Oct 09 08:53:42 2009 +0100
+++ b/xen/common/grant_table.c Fri Oct 09 08:54:25 2009 +0100
@@ -1754,7 +1754,7 @@ __acquire_grant_for_copy(
blocks mappings of transitive grants. */
is_sub_page = 1;
*owning_domain = rrd;
- act->gfn = INVALID_GFN;
+ act->gfn = -1ul;
}
else if ( sha1 )
{
diff -r 0e6c04748fd2 -r 0f43f39ce6a9 xen/include/asm-ia64/grant_table.h
--- a/xen/include/asm-ia64/grant_table.h Fri Oct 09 08:53:42 2009 +0100
+++ b/xen/include/asm-ia64/grant_table.h Fri Oct 09 08:54:25 2009 +0100
@@ -31,8 +31,12 @@ int guest_physmap_add_page(struct domain
/* 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 @@ int guest_physmap_add_page(struct domain
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 0e6c04748fd2 -r 0f43f39ce6a9 xen/include/asm-x86/grant_table.h
--- a/xen/include/asm-x86/grant_table.h Fri Oct 09 08:53:42 2009 +0100
+++ b/xen/include/asm-x86/grant_table.h Fri Oct 09 08:54:25 2009 +0100
@@ -44,7 +44,7 @@ int replace_grant_host_mapping(
((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))
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|