kvm: use separate MemoryListeners for memory and I/O
commitd22b096ef6e0b20810193b68a1d472f3fb8a4f9e
authorAvi Kivity <avi@redhat.com>
Sun, 30 Sep 2012 20:21:11 +0000 (30 22:21 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 15 Oct 2012 09:43:06 +0000 (15 11:43 +0200)
tree753a129e3f8cf0c5b916ecf2612c72c9e7e83b3f
parent0fada67420e29f389119ca6f44285203400e0730
kvm: use separate MemoryListeners for memory and I/O

The construct

   if (address_space == get_system_memory()) {
       // memory thing
   } else {
       // io thing
   }

fails if we have more than two address spaces.  Use a separate listener
for memory and I/O, and utilize MemoryListener's address space filtering to
fix this.

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