memory: Split zones when do coalesced_io_del()
commit23f1174aac4181f86bb7e13ca8bc2d4a0bdf1e5c
authorPeter Xu <peterx@redhat.com>
Tue, 20 Aug 2019 14:13:25 +0000 (20 22:13 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Aug 2019 14:31:58 +0000 (21 16:31 +0200)
treea5116df79890fe7efda4192dff26bdb1dd5c79bc
parent9c1aa1c235c770d84462d482460a96e957e95b9c
memory: Split zones when do coalesced_io_del()

It is a workaround of current KVM's KVM_UNREGISTER_COALESCED_MMIO
interface.  The kernel interface only allows to unregister an mmio
device with exactly the zone size when registered, or any smaller zone
that is included in the device mmio zone.  It does not support the
userspace to specify a very large zone to remove all the small mmio
devices within the zone covered.

Logically speaking it would be nicer to fix this from KVM side, though
in all cases we still need to coop with old kernels so let's do this.

Fixes: 3ac7d43a6fbb5d4a3
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20190820141328.10009-2-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory.c