This reworks the slot management to handle all patterns of
cpu_register_physical_memory*, finally allowing to reset KVM guests (so
far address remapping on reset broke the slot management).
Nevertheless, KVM kernel bug in older versions forces us to track
previousfragmentations and maintain them (as that bug prevents
registering larger slots that overlap also deleted ones). When affected
KVM versions are detected, we apply a workaround that covers all
currently used patterns.
Changes in v2:
- detect KVM kernel bug and apply the workaround only when needed
Signed-off-by: Jan Kiszka <address@hidden>