ia64/xen-unstable

changeset 14756:3b4de5f415c9

[HVM] Save/restore: qemu-dm should calculate bitmap size from maximum gpfn
like xc_save does.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Apr 05 18:12:21 2007 +0100 (2007-04-05)
parents 83ce6f4da212
children 67f4f21f76e9
files tools/ioemu/xenstore.c
line diff
     1.1 --- a/tools/ioemu/xenstore.c	Thu Apr 05 15:47:03 2007 +0100
     1.2 +++ b/tools/ioemu/xenstore.c	Thu Apr 05 18:12:21 2007 +0100
     1.3 @@ -248,12 +248,8 @@ void xenstore_process_logdirty_event(voi
     1.4          key = (key_t) strtoull(key_terminated, NULL, 16);
     1.5  
     1.6          /* Figure out how bit the log-dirty bitmaps are */
     1.7 -        logdirty_bitmap_size = ((phys_ram_size + 0x20 
     1.8 -                                 - (vga_ram_size + bios_size)) 
     1.9 -                                >> (TARGET_PAGE_BITS)); /* nr of bits in map*/
    1.10 -        if (logdirty_bitmap_size > HVM_BELOW_4G_MMIO_START >> TARGET_PAGE_BITS)
    1.11 -            logdirty_bitmap_size += 
    1.12 -                HVM_BELOW_4G_MMIO_LENGTH >> TARGET_PAGE_BITS; /* still bits */
    1.13 +        logdirty_bitmap_size = xc_memory_op(xc_handle, 
    1.14 +                                            XENMEM_maximum_gpfn, &domid) + 1;
    1.15          logdirty_bitmap_size = ((logdirty_bitmap_size + HOST_LONG_BITS - 1)
    1.16                                  / HOST_LONG_BITS); /* longs */
    1.17          logdirty_bitmap_size *= sizeof (unsigned long); /* bytes */