WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] fix maximum_gpfn hypercall

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH] fix maximum_gpfn hypercall
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Tue, 5 Feb 2008 18:12:52 +0900
Delivery-date: Tue, 05 Feb 2008 01:13:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
HVM livemigation fails without this patch.

according to x86 side:
http://xenbits.xensource.com/xen-unstable.hg?rev/55d0a5c70986

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r c98276a51ff8 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Mon Feb 04 08:38:35 2008 -0700
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Tue Feb 05 17:56:01 2008 +0900
@@ -485,7 +485,7 @@ xc_domain_save(int xc_handle, int io_fd,
         goto out;
     }
 
-    p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom);
+    p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom) + 1;
 
     /* This is expected by xm restore.  */
     if (write_exact(io_fd, &p2m_size, sizeof(unsigned long))) {
diff -r c98276a51ff8 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon Feb 04 08:38:35 2008 -0700
+++ b/xen/arch/ia64/xen/domain.c        Tue Feb 05 17:56:01 2008 +0900
@@ -1772,8 +1772,8 @@ int shadow_mode_control(struct domain *d
                atomic64_set(&d->arch.shadow_dirty_count, 0);
 
                d->arch.shadow_bitmap_size =
-                       ((d->arch.convmem_end >> PAGE_SHIFT) +
-                        BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1);
+                       (domain_get_maximum_gpfn(d) + BITS_PER_LONG) &
+                       ~(BITS_PER_LONG - 1);
                d->arch.shadow_bitmap = xmalloc_array(unsigned long,
                                   d->arch.shadow_bitmap_size / BITS_PER_LONG);
                if (d->arch.shadow_bitmap == NULL) {
diff -r c98276a51ff8 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Mon Feb 04 08:38:35 2008 -0700
+++ b/xen/arch/ia64/xen/mm.c    Tue Feb 05 17:56:01 2008 +0900
@@ -430,7 +430,7 @@ unsigned long
 unsigned long
 domain_get_maximum_gpfn(struct domain *d)
 {
-    return (d->arch.convmem_end + PAGE_SIZE - 1) >> PAGE_SHIFT;
+    return (d->arch.convmem_end - 1) >> PAGE_SHIFT;
 }
 
 // stolen from share_xen_page_with_guest() in xen/arch/x86/mm.c
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>