kvm: kvm_log_sync() is only called with known memory sections
commit67548f09656eaedf6b48712639afc7bddd2d9526
authorDavid Hildenbrand <david@redhat.com>
Mon, 11 Sep 2017 17:49:33 +0000 (11 19:49 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Sep 2017 12:09:34 +0000 (19 14:09 +0200)
treedc3039926942fe24fe45607fb46738f7ab99cd50
parent343562e8fa2222046feb3a730f60397784d108de
kvm: kvm_log_sync() is only called with known memory sections

Flatview will make sure that we can only end up in this function with
memory sections that correspond to exactly one slot. So we don't
have to iterate multiple times. There won't be overlapping slots but
only matching slots.

Properly align the section and look up the corresponding slot. This
heavily simplifies this function.

We can now get rid of kvm_lookup_overlapping_slot().

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-7-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c