# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1202229408 25200
# Node ID e83d2b840e88223a92f8473b23ae57876e298fc8
# Parent 700f33cc0297703d189570e6feba045555a0b481
[IA64] Fix maximum_gpfn hypercall
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>
---
tools/libxc/ia64/xc_ia64_linux_save.c | 2 +-
xen/arch/ia64/xen/domain.c | 4 ++--
xen/arch/ia64/xen/mm.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff -r 700f33cc0297 -r e83d2b840e88 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c Tue Feb 05 09:30:25 2008 -0700
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c Tue Feb 05 09:36:48 2008 -0700
@@ -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 700f33cc0297 -r e83d2b840e88 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Tue Feb 05 09:30:25 2008 -0700
+++ b/xen/arch/ia64/xen/domain.c Tue Feb 05 09:36:48 2008 -0700
@@ -1768,8 +1768,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 700f33cc0297 -r e83d2b840e88 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Tue Feb 05 09:30:25 2008 -0700
+++ b/xen/arch/ia64/xen/mm.c Tue Feb 05 09:36:48 2008 -0700
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|