mbox series

[0/3] Cleanup VFIOIOMMUClass callback return with bool

Message ID 20240506083352.4037226-1-zhenzhong.duan@intel.com (mailing list archive)
Headers show
Series Cleanup VFIOIOMMUClass callback return with bool | expand

Message

Duan, Zhenzhong May 6, 2024, 8:33 a.m. UTC
Hi

This is a cleanup series to change VFIOIOMMUClass callbacks to return
bool when the error is passed through errp parameter.

See discussion at https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg04782.html

It looks many functions in VFIO sub-system need same change,
so this can be a very first series.

Test done on x86 platform:
vfio device hotplug/unplug with different backend
reboot

Thanks
Zhenzhong

Zhenzhong Duan (3):
  vfio: Make VFIOIOMMUClass::attach_device() and its wrapper return bool
  vfio: Make VFIOIOMMUClass::setup() return bool
  vfio: Make VFIOIOMMUClass::add_window() and its wrapper return bool

 include/hw/vfio/vfio-common.h         |  4 ++--
 include/hw/vfio/vfio-container-base.h | 18 ++++++++---------
 hw/vfio/ap.c                          |  6 ++----
 hw/vfio/ccw.c                         |  6 ++----
 hw/vfio/common.c                      |  6 +++---
 hw/vfio/container-base.c              |  8 ++++----
 hw/vfio/container.c                   | 24 +++++++++++------------
 hw/vfio/iommufd.c                     | 11 +++++------
 hw/vfio/pci.c                         |  8 +++-----
 hw/vfio/platform.c                    |  7 +++----
 hw/vfio/spapr.c                       | 28 +++++++++++++--------------
 11 files changed, 58 insertions(+), 68 deletions(-)