All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] vfio: free data and unmap BARs in instance_finalize
@ 2015-02-04 12:11 Paolo Bonzini
  2015-02-04 12:11 ` [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paolo Bonzini @ 2015-02-04 12:11 UTC (permalink / raw)
  To: qemu-devel; +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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH v3 0/3] vfio: free data and unmap BARs in instance_finalize
@ 2015-02-06 21:15 Paolo Bonzini
  2015-02-06 21:15 ` [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2015-02-06 21:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Williamson

Mostly the same as v2;

- patch 1 makes the error paths of vfio_get_device a bit simpler

- patch 2 introduces instance_finalize

- patch 3 makes the freeing of BARs RCU-friendly

Changes from v2:

1) not removing anymore the NULL assignment in vfio_put_base_device

2) patch 1 should "goto out_put" if vfio_populate_device fails (later
changed to "return ret" in patch 2).  The final code doesn't change;
this only matters for bisectability (and even then only in a corner case).

Thanks,

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-06 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 12:11 [Qemu-devel] [PATCH v2 0/3] vfio: free data and unmap BARs in instance_finalize Paolo Bonzini
2015-02-04 12:11 ` [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback Paolo Bonzini
2015-02-04 18:22   ` Alex Williamson
2015-02-04 20:14     ` Paolo Bonzini
2015-02-04 12:11 ` [Qemu-devel] [PATCH 2/3] vfio: free dynamically-allocated data in instance_finalize Paolo Bonzini
2015-02-04 12:11 ` [Qemu-devel] [PATCH 3/3] vfio: unmap and free BAR " Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2015-02-06 21:15 [Qemu-devel] [PATCH v3 0/3] vfio: free data and unmap BARs " Paolo Bonzini
2015-02-06 21:15 ` [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.