Skip to content

PCI: Cleanup legacy casts in device land

[email protected] qemu-devel qemu-trivial 2 versions – Applied

Status from this message: Thanks, applied to qom-next:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest30 patches 21 repliesApplied
  2. v130 patches 6 repliesSuperseded

Changes in v2 from the cover letter

Removed hunks which macroified VMSD names
Dropped virtio/virtio.pci patch
Rebased

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/30net/e1000: QOM Upcast Sweephw/net/e1000.c+12 -61 reply
2/30net/rtl8139: QOM Upcast Sweephw/net/rtl8139.c+18 -81 reply
3/30net/pcnet-pci: QOM Upcast Sweephw/net/pcnet-pci.c+9 -53 replies
4/30usb/hcd-xhci: QOM Upcast Sweephw/usb/hcd-xhci.c+13 -62 replies
5/30scsi/lsi53c895a: QOM Upcast Sweephw/scsi/lsi53c895a.c+16 -102 replies
6/30scsi/megasas: QOM Upcast Sweephw/scsi/megasas.c+10 -51 reply
7/30scsi/esp-pci: QOM Upcast Sweephw/scsi/esp-pci.c+9 -51 reply
8/30ide/ich: QOM Upcast Sweephw/ide/ahci.h hw/ide/ich.c+10 -55 replies
9/30ide/piix: QOM casting sweephw/ide/piix.c+4 -44 replies
10/30acpi/piix4: QOM Upcast Sweephw/acpi/piix4.c+17 -141 reply
11/30misc/pci-testdev: QOM Upcast Sweephw/misc/pci-testdev.c+8 -32 replies
12/30virtio/vmware_vga: QOM casting sweephw/display/vmware_vga.c+8 -52 replies
13/30misc/ivshmem: QOM Upcast Sweephw/misc/ivshmem.c+11 -73 replies
14/30xen/xen_platform: QOM casting sweephw/xen/xen_platform.c+16 -122 replies
15/30isa/*: QOM casting sweephw/isa/i82378.c hw/isa/lpc_ich9.c+7 -70 replies
16/30pci/*: QOM casting sweephw/pci/pci-hotplug.c hw/pci/pci.c hw/pci/pcie.c +1 more+25 -221 reply
17/30pci-bridge/pci_bridge_dev: Don't use DO_UPCASThw/pci-bridge/pci_bridge_dev.c+1 -10 replies
18/30pci-bridge/*: substitute ->qdev casts with DEVICE()hw/pci-bridge/i82801b11.c hw/pci-bridge/ioh3420.c hw/pci-bridge/xio3130_downstream.c +1 more+4 -40 replies
19/30pci/pci_bridge: substitute ->qdev casts with DEVICE()hw/pci/pci_bridge.c+4 -30 replies
20/30misc/vfio: substitute ->qdev casts with DEVICE()hw/misc/vfio.c+2 -20 replies
21/30net/eepro100: substitute ->qdev casts with DEVICE()hw/net/eepro100.c+8 -60 replies
22/30net/ne2000: substitute ->qdev casts with DEVICE()hw/net/ne2000.c+4 -20 replies
23/30usb/*: substitute ->qdev casts with DEVICE()hw/usb/hcd-ehci-pci.c hw/usb/hcd-ohci.c hw/usb/hcd-uhci.c+10 -70 replies
24/30watchdog/wdt_i6300esb: substitute ->qdev casts with DEVICE()hw/watchdog/wdt_i6300esb.c+1 -10 replies
25/30scsi/vmw_pvscsi: substitute ->qdev casts with DEVICE()hw/scsi/vmw_pvscsi.c+1 -10 replies
26/30i2c/smbus_ich9: substitute ->qdev casts with DEVICE()hw/i2c/smbus_ich9.c+1 -10 replies
27/30ide/cmd646: substitute ->qdev casts with DEVICE()hw/ide/cmd646.c+4 -40 replies
28/30ide/via: substitute ->qdev casts with DEVICE()hw/ide/via.c+2 -20 replies
29/30pci-host/*: substitute ->qdev casts with DEVICE()hw/pci-bridge/dec.c hw/pci-host/apb.c hw/pci-host/q35.c+5 -50 replies
30/30i386/*: substitute ->qdev casts with DEVICE()hw/i386/kvm/pci-assign.c hw/i386/pc.c hw/i386/pc_piix.c +1 more+18 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/30] PCI: Cleanup legacy casts in device land

From: Peter Crosthwaite <[email protected]>

There are a number of different cast implementations from various stages of QEMU development out in device model land. This series cleans up the ones involving TYPE_PCI_DEVICE to consistently use proper QOM casts for both up and down casts.

Some were easy, some needed QOM cast macros which are added as appropriate.

Following the recent discussion RE performance consequences of QOM casts, im interested in any reports of possible performance regressions here, although I am hoping that Anthony current efforts to improve QOM casting efficiency make this a non-issue.

Changed since V1:
Removed hunks which macroified VMSD names
Dropped virtio/virtio.pci patch
Rebased

Peter Crosthwaite (30):
net/e1000: QOM Upcast Sweep
net/rtl8139: QOM Upcast Sweep
net/pcnet-pci: QOM Upcast Sweep
usb/hcd-xhci: QOM Upcast Sweep
scsi/lsi53c895a: QOM Upcast Sweep
scsi/megasas: QOM Upcast Sweep
scsi/esp-pci: QOM Upcast Sweep
ide/ich: QOM Upcast Sweep
ide/piix: QOM casting sweep
acpi/piix4: QOM Upcast Sweep
misc/pci-testdev: QOM Upcast Sweep virtio/vmware_vga: QOM casting sweep
misc/ivshmem: QOM Upcast Sweep
xen/xen_platform: QOM casting sweep
isa/*: QOM casting sweep
pci/*: QOM casting sweep pci-bridge/pci_bridge_dev: Don't use DO_UPCAST pci-bridge/*: substitute ->qdev casts with DEVICE() pci/pci_bridge: substitute ->qdev casts with DEVICE() misc/vfio: substitute ->qdev casts with DEVICE() net/eepro100: substitute ->qdev casts with DEVICE() net/ne2000: substitute ->qdev casts with DEVICE() usb/*: substitute ->qdev casts with DEVICE() watchdog/wdt_i6300esb: substitute ->qdev casts with DEVICE() scsi/vmw_pvscsi: substitute ->qdev casts with DEVICE() i2c/smbus_ich9: substitute ->qdev casts with DEVICE() ide/cmd646: substitute ->qdev casts with DEVICE() ide/via: substitute ->qdev casts with DEVICE() pci-host/*: substitute ->qdev casts with DEVICE() i386/*: substitute ->qdev casts with DEVICE()

 hw/acpi/piix4.c                    | 31 +++++++++++++++++--------------
 hw/display/vmware_vga.c            | 13 ++++++++-----
 hw/i2c/smbus_ich9.c                |  2 +-
 hw/i386/kvm/pci-assign.c           | 21 ++++++++++++---------
 hw/i386/pc.c                       |  3 ++-
 hw/i386/pc_piix.c                  |  4 ++--
 hw/i386/pc_q35.c                   |  4 ++--
 hw/ide/ahci.h                      |  5 +++++
 hw/ide/cmd646.c                    |  8 ++++----
 hw/ide/ich.c                       | 10 +++++-----
 hw/ide/piix.c                      |  8 ++++----
 hw/ide/via.c                       |  4 ++--
 hw/isa/i82378.c                    |  8 ++++----
 hw/isa/lpc_ich9.c                  |  6 +++---
 hw/misc/ivshmem.c                  | 18 +++++++++++-------
 hw/misc/pci-testdev.c              | 11 ++++++++---
 hw/misc/vfio.c                     |  4 ++--
 hw/net/e1000.c                     | 18 ++++++++++++------
 hw/net/eepro100.c                  | 14 ++++++++------
 hw/net/ne2000.c                    |  6 ++++--
 hw/net/pcnet-pci.c                 | 14 +++++++++-----
 hw/net/rtl8139.c                   | 26 ++++++++++++++++++--------
 hw/pci-bridge/dec.c                |  2 +-
 hw/pci-bridge/i82801b11.c          |  2 +-
 hw/pci-bridge/ioh3420.c            |  2 +-
 hw/pci-bridge/pci_bridge_dev.c     |  2 +-
 hw/pci-bridge/xio3130_downstream.c |  2 +-
 hw/pci-bridge/xio3130_upstream.c   |  2 +-
 hw/pci-host/apb.c                  |  4 ++--
 hw/pci-host/q35.c                  |  4 ++--
 hw/pci/pci-hotplug.c               | 18 ++++++++++--------
 hw/pci/pci.c                       | 17 +++++++++--------
 hw/pci/pci_bridge.c                |  7 ++++---
 hw/pci/pcie.c                      |  4 ++--
 hw/pci/shpc.c                      |  8 ++++----
 hw/scsi/esp-pci.c                  | 14 +++++++++-----
 hw/scsi/lsi53c895a.c               | 26 ++++++++++++++++----------
 hw/scsi/megasas.c                  | 15 ++++++++++-----
 hw/scsi/vmw_pvscsi.c               |  2 +-
 hw/usb/hcd-ehci-pci.c              | 13 ++++++++-----
 hw/usb/hcd-ohci.c                  |  2 +-
 hw/usb/hcd-uhci.c                  |  2 +-
 hw/usb/hcd-xhci.c                  | 19 +++++++++++++------
 hw/watchdog/wdt_i6300esb.c         |  2 +-
 hw/xen/xen_platform.c              | 28 ++++++++++++++++------------
 45 files changed, 258 insertions(+), 177 deletions(-)
Signature · 1 line
1.8.3.rc1.44.gb387c77.dirty