From: aliguori Date: Wed, 19 Nov 2008 15:09:54 +0000 (+0000) Subject: kvm: de-register mem region for MMIO (Glauber Costa) X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a3d6841ff82223f4c2bb05dbf3e29335e15f31c2;p=qemu.git 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5753 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/kvm-all.c b/kvm-all.c index 18e9361daa..5cb2db24ab 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -322,7 +322,7 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr, mem = kvm_lookup_slot(s, start_addr); if (mem) { - if (flags == IO_MEM_UNASSIGNED) { + if ((flags == IO_MEM_UNASSIGNED) || (flags >= TLB_MMIO)) { mem->memory_size = 0; mem->guest_phys_addr = start_addr; mem->userspace_addr = 0;