From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIyng-0005pu-Tg for qemu-devel@nongnu.org; Wed, 04 Feb 2015 07:11:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIynd-0002Pa-0V for qemu-devel@nongnu.org; Wed, 04 Feb 2015 07:11:20 -0500 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:36694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIync-0002PJ-R9 for qemu-devel@nongnu.org; Wed, 04 Feb 2015 07:11:16 -0500 Received: by mail-wg0-f53.google.com with SMTP id a1so1301142wgh.12 for ; Wed, 04 Feb 2015 04:11:16 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 4 Feb 2015 13:11:07 +0100 Message-Id: <1423051870-26473-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/3] vfio: free data and unmap BARs in instance_finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alex Williamson This is v2 of the patch sent yesterday. In addition to including the missing vfio bits, I split it in two parts: one introducing instance_finalize (patch 2), and the second making the freeing of BARs RCU-friendly (patch 3). With these two changes I found the error path logic a bit hard to follow. So I preceded it with patch 1, which tries to make things a little bit clearer, at least to me. VFIO is probably the device that requires the largest changes, due to the complex, highly data-driven initialization sequence. No other device can use so many dynamic data structures, because their configuration is obviously not as variable as for PCI pass-through. Paolo Paolo Bonzini (3): vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback vfio: free dynamically-allocated data in instance_finalize vfio: unmap and free BAR data in instance_finalize hw/vfio/common.c | 36 ++++++++-------- hw/vfio/pci.c | 96 ++++++++++++++++++++++++++++++++++--------- include/hw/vfio/vfio-common.h | 1 - 3 files changed, 92 insertions(+), 41 deletions(-) -- 1.8.3.1