ia64/xen-unstable

changeset 16982:e83d2b840e88

[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@jp.fujitsu.com>
author Alex Williamson <alex.williamson@hp.com>
date Tue Feb 05 09:36:48 2008 -0700 (2008-02-05)
parents 700f33cc0297
children 741ac532eb79
files tools/libxc/ia64/xc_ia64_linux_save.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_linux_save.c	Tue Feb 05 09:30:25 2008 -0700
     1.2 +++ b/tools/libxc/ia64/xc_ia64_linux_save.c	Tue Feb 05 09:36:48 2008 -0700
     1.3 @@ -485,7 +485,7 @@ xc_domain_save(int xc_handle, int io_fd,
     1.4          goto out;
     1.5      }
     1.6  
     1.7 -    p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom);
     1.8 +    p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom) + 1;
     1.9  
    1.10      /* This is expected by xm restore.  */
    1.11      if (write_exact(io_fd, &p2m_size, sizeof(unsigned long))) {
     2.1 --- a/xen/arch/ia64/xen/domain.c	Tue Feb 05 09:30:25 2008 -0700
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Tue Feb 05 09:36:48 2008 -0700
     2.3 @@ -1768,8 +1768,8 @@ int shadow_mode_control(struct domain *d
     2.4  		atomic64_set(&d->arch.shadow_dirty_count, 0);
     2.5  
     2.6  		d->arch.shadow_bitmap_size =
     2.7 -			((d->arch.convmem_end >> PAGE_SHIFT) +
     2.8 -			 BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1);
     2.9 +			(domain_get_maximum_gpfn(d) + BITS_PER_LONG) &
    2.10 +			~(BITS_PER_LONG - 1);
    2.11  		d->arch.shadow_bitmap = xmalloc_array(unsigned long,
    2.12  		                   d->arch.shadow_bitmap_size / BITS_PER_LONG);
    2.13  		if (d->arch.shadow_bitmap == NULL) {
     3.1 --- a/xen/arch/ia64/xen/mm.c	Tue Feb 05 09:30:25 2008 -0700
     3.2 +++ b/xen/arch/ia64/xen/mm.c	Tue Feb 05 09:36:48 2008 -0700
     3.3 @@ -430,7 +430,7 @@ mm_final_teardown(struct domain* d)
     3.4  unsigned long
     3.5  domain_get_maximum_gpfn(struct domain *d)
     3.6  {
     3.7 -    return (d->arch.convmem_end + PAGE_SIZE - 1) >> PAGE_SHIFT;
     3.8 +    return (d->arch.convmem_end - 1) >> PAGE_SHIFT;
     3.9  }
    3.10  
    3.11  // stolen from share_xen_page_with_guest() in xen/arch/x86/mm.c