Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2n8J-00070h-59 for qemu-devel@nongnu.org; Wed, 19 Nov 2008 08:30:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2n8H-0006zE-9S for qemu-devel@nongnu.org; Wed, 19 Nov 2008 08:30:14 -0500 Received: from [199.232.76.173] (port=48242 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2n8G-0006yw-PS for qemu-devel@nongnu.org; Wed, 19 Nov 2008 08:30:12 -0500 Received: from mx2.redhat.com ([66.187.237.31]:38806) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2n8F-0002WS-GS for qemu-devel@nongnu.org; Wed, 19 Nov 2008 08:30:12 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAJDUB5p032609 for ; Wed, 19 Nov 2008 08:30:11 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAJDUAqD031506 for ; Wed, 19 Nov 2008 08:30:10 -0500 Received: from localhost.localdomain (vpn-13-9.rdu.redhat.com [10.11.13.9]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAJDU4pD030894 for ; Wed, 19 Nov 2008 08:30:09 -0500 From: Glauber Costa Date: Wed, 19 Nov 2008 13:26:15 -0200 Message-Id: <1227108377-8442-5-git-send-email-glommer@redhat.com> In-Reply-To: <1227108377-8442-4-git-send-email-glommer@redhat.com> References: <1227108377-8442-1-git-send-email-glommer@redhat.com> <1227108377-8442-2-git-send-email-glommer@redhat.com> <1227108377-8442-3-git-send-email-glommer@redhat.com> <1227108377-8442-4-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 4/6] kvm: de-register mem region for MMIO. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- kvm-all.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index b5bbdcb..9700e50 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -344,7 +344,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; -- 1.5.6.5