This series aims to further improve the naming conventions for some QOM-related parts of VFIO so that it is easier to understand the object model.
The first part of the series renames VFIOContainer to VFIOLegacyContainer as the existing name is misleading, particularly in the context of classes that are derived from it. Following on from this the VFIOContainerBase struct is now renamed to VFIOContainer as it represents the parent of other VFIOFOOContainer types. The next part of the series adds some extra QOM casts that were missed from my last patchset, which then allows us to rename the QOM parent object to parent_obj as per our current coding guidelines. After this there are some more renames for various QOM/qdev declarations so that the function names correspond with the underlying QOM type name: this makes it easier to locate them within the source tree. Finally there is also a rename of TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE since that allows the QOM type (and cast) to match the name of the underlying VFIOPCIDevice struct. Signed-off-by: Mark Cave-Ayland <[email protected]> Mark Cave-Ayland (27): include/hw/vfio/vfio-container.h: rename VFIOContainer to VFIOLegacyContainer include/hw/vfio/vfio-container-base.h: rename VFIOContainerBase to VFIOContainer include/hw/vfio/vfio-container.h: rename file to vfio-container-legacy.h include/hw/vfio/vfio-container-base.h: rename file to vfio-container.h hw/vfio/container.c: rename file to container-legacy.c hw/vfio/container-base.c: rename file to container.c vfio/iommufd.c: use QOM casts where appropriate vfio/cpr-iommufd.c: use QOM casts where appropriate vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj vfio/spapr.c: use QOM casts where appropriate vfio/spapr.c: rename VFIOContainer bcontainer field to parent_obj vfio/pci.c: rename vfio_instance_init() to vfio_pci_init() vfio/pci.c: rename vfio_instance_finalize() to vfio_pci_finalize() vfio/pci.c: rename vfio_pci_dev_class_init() to vfio_pci_class_init() vfio/pci.c: rename vfio_pci_dev_info to vfio_pci_info hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init() vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[] vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[] vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init() vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init() vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[] vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init() vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize() vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info hw/ppc/spapr_pci_vfio.c | 14 +- hw/s390x/s390-pci-vfio.c | 16 +- hw/vfio-user/container.c | 18 +- hw/vfio-user/container.h | 4 +- hw/vfio-user/pci.c | 35 +- hw/vfio/container-base.c | 347 ------ hw/vfio/container-legacy.c | 1277 ++++++++++++++++++++++ hw/vfio/container.c | 1325 ++++------------------- hw/vfio/cpr-iommufd.c | 4 +- hw/vfio/cpr-legacy.c | 43 +- hw/vfio/device.c | 4 +- hw/vfio/iommufd.c | 48 +- hw/vfio/listener.c | 74 +- hw/vfio/meson.build | 2 +- hw/vfio/pci.c | 68 +- hw/vfio/pci.h | 2 +- hw/vfio/spapr.c | 52 +- hw/vfio/types.h | 4 +- hw/vfio/vfio-iommufd.h | 9 +- hw/vfio/vfio-listener.h | 4 +- include/hw/vfio/vfio-container-base.h | 279 ----- include/hw/vfio/vfio-container-legacy.h | 39 + include/hw/vfio/vfio-container.h | 286 ++++- include/hw/vfio/vfio-cpr.h | 15 +- include/hw/vfio/vfio-device.h | 6 +- 25 files changed, 1988 insertions(+), 1987 deletions(-) delete mode 100644 hw/vfio/container-base.c create mode 100644 hw/vfio/container-legacy.c delete mode 100644 include/hw/vfio/vfio-container-base.h create mode 100644 include/hw/vfio/vfio-container-legacy.h -- 2.43.0
