vhost: memory sync fixes
commit6b37a23df98faa26391a93373930bfb15b943e00
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 21 Feb 2013 11:16:06 +0000 (21 13:16 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Feb 2013 21:59:15 +0000 (26 23:59 +0200)
treead5a2141eebf95163f2bc8b65903ee968320ad4e
parent864a556e9a800116a305f10fbb714268ca7e9bc3
vhost: memory sync fixes

This fixes two bugs related to memory sync during
migration:
    - ram address calculation was missing the chunk
      address, so the wrong page was dirtied
    - one after last was used instead of the
      end address of a region, which might overflow to 0
      and cause us to skip the region when the region ends at
      ~0x0ull.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
hw/vhost.c