kvm: improve handling of overlapping slots (Jan Kiszka)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 17 Apr 2009 14:26:33 +0000 (14:26 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 17 Apr 2009 14:26:33 +0000 (14:26 +0000)
commit6152e2ae4344ec8c849393da3f76f2263cc55766
treea9524ccbd9596457dd2375854ba033aced81248e
parentd3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a
kvm: improve handling of overlapping slots (Jan Kiszka)

This reworks the slot management to handle more patterns of
cpu_register_physical_memory*, finally allowing to reset KVM guests (so
far address remapping on reset broke the slot management).

We could actually handle all possible ones without failing, but a KVM
kernel bug in older versions would force us to track all previous
fragmentations and maintain them (as that bug prevents registering
larger slots that overlap also deleted ones). To remain backward
compatible but avoid overly complicated workarounds, we apply a simpler
workaround that covers all currently used patterns.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7139 c046a42c-6fe2-441c-8c8c-71466251a162
kvm-all.c