Fix live migration out-of-memory
commit119f9ed1ad0c3f8c4ab78390bc5d0c55b226dc3d
authorAvi Kivity <avi@redhat.com>
Sun, 21 Jun 2009 14:59:35 +0000 (21 17:59 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 21 Jun 2009 14:59:35 +0000 (21 17:59 +0300)
tree753ddaed428d5c0071fda562639ab0d06aa68609
parent772555c2e57c82f4fe83208d1e77f4d6b4e61466
Fix live migration out-of-memory

Upsteam commit 9fa06385f6 ("kvm: Mark full address range dirty on live
migration start") requests dirty logging on the entire 64-bit address
space.  This triggered an allocation in qemu-kvm.c for this range,
which oomed.

Fix by allocating the buffer when we know the actual slot, thus
allocating exactly as much memory as necessary.

Signed-off-by: Avi Kivity <avi@redhat.com>
libkvm-all.h
qemu-kvm.c