From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6TrQ-0003So-DP for qemu-devel@nongnu.org; Mon, 26 Apr 2010 15:20:52 -0400 Received: from [140.186.70.92] (port=47585 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6TrP-0003Qk-1E for qemu-devel@nongnu.org; Mon, 26 Apr 2010 15:20:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6TrN-0004kV-Ct for qemu-devel@nongnu.org; Mon, 26 Apr 2010 15:20:50 -0400 Received: from mail-qy0-f188.google.com ([209.85.221.188]:53255) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6TrN-0004kQ-AD for qemu-devel@nongnu.org; Mon, 26 Apr 2010 15:20:49 -0400 Received: by qyk26 with SMTP id 26so5642412qyk.19 for ; Mon, 26 Apr 2010 12:20:48 -0700 (PDT) Message-ID: <4BD5E78A.6090507@codemonkey.ws> Date: Mon, 26 Apr 2010 14:20:42 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map References: <2e085c19aac78e6c4335eac4fffeb5cfca4bbb26.1272304746.git.mtosatti@redhat.com> <4BD5DB72.3030707@codemonkey.ws> <20100426185055.GG21425@amt.cnet> <4BD5E221.9080105@codemonkey.ws> <20100426191457.GI21425@amt.cnet> In-Reply-To: <20100426191457.GI21425@amt.cnet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Anthony Liguori , Cam Macdonell , qemu-devel@nongnu.org, kvm@vger.kernel.org On 04/26/2010 02:14 PM, Marcelo Tosatti wrote: > On Mon, Apr 26, 2010 at 01:57:37PM -0500, Anthony Liguori wrote: > >> On 04/26/2010 01:50 PM, Marcelo Tosatti wrote: >> >>> On Mon, Apr 26, 2010 at 01:29:06PM -0500, Anthony Liguori wrote: >>> >>>> On 04/26/2010 12:59 PM, Marcelo Tosatti wrote: >>>> >>>>> Which allows drivers to register an mmaped region into ram block mappings. >>>>> To be used by device assignment driver. >>>>> >>>>> >>>> This is not kvm specific and not required by this pull request so it >>>> shouldn't really be part of the pull. Something like this should >>>> only be added when there's an actual consumer. >>>> >>> The user will be hw/device-assignment.c in qemu-kvm. And also Cam has >>> the need for a similar interface for shared memory drivers. >>> >> It should be part of one of those submissions. >> > OK > > >>> @@ -726,10 +724,6 @@ >>> kvm_remove_ioperm_data(region->u.r_baseport, region->r_size); >>> continue; >>> } else if (pci_region->type& IORESOURCE_MEM) { >>> - if (region->e_size> 0) >>> - kvm_destroy_phys_mem(kvm_context, region->e_physbase, >>> - TARGET_PAGE_ALIGN(region->e_size)); >>> - >>> if (region->u.r_virtbase) { >>> int ret = munmap(region->u.r_virtbase, >>> (pci_region->size + 0xFFF)& 0xFFFFF000); >>> >> How does hot unplug get dealt with? >> > The regions will have such mappings unmapped from QEMU (and KVM) via > cpu_register_physical_memory(IO_MEM_UNASSIGNED) via > pci_unregister_io_regions. > But how do you qemu_ram_unmap()? I see you munmap() that address but it looks like the qemu ram region gets leaked pointing to an invalid pointer. Regards, Anthony Liguori > Just pushed a new tree without the patch, please pull if you > are OK with the other changes. > Yes, I am. > >