Commit a3d6841ff82223f4c2bb05dbf3e29335e15f31c2

Authored by aliguori
1 parent d5b4eb40

kvm: de-register mem region for MMIO (Glauber Costa)

Besides unassigned memory, we also don't care about MMIO.
So if we're giving an MMIO area that is already registered,
wipe it out.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5753 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 1 deletions
kvm-all.c
... ... @@ -322,7 +322,7 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr,
322 322  
323 323 mem = kvm_lookup_slot(s, start_addr);
324 324 if (mem) {
325   - if (flags == IO_MEM_UNASSIGNED) {
  325 + if ((flags == IO_MEM_UNASSIGNED) || (flags >= TLB_MMIO)) {
326 326 mem->memory_size = 0;
327 327 mem->guest_phys_addr = start_addr;
328 328 mem->userspace_addr = 0;
... ...