Re: [Qemu-block] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices
On 27/09/2017 22:56, Eduardo Habkost wrote: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to all direct subtypes of TYPE_PCI_DEVICE, except: 1) The ones that already have INTERFACE_PCIE_DEVICE set: * base-xhci * e1000e * nvme * pvscsi * vfio-pci * virtio-pci * vmxnet3 2) base-pci-bridge Not all PCI bridges are Conventional PCI devices, so INTERFACE_CONVENTIONAL_PCI_DEVICE is added only to the subtypes that are actually Conventional PCI: * dec-21154-p2p-bridge * i82801b11-bridge * pbm-bridge * pci-bridge The direct subtypes of base-pci-bridge not touched by this patch are: * xilinx-pcie-root: Already marked as PCIe-only. * pcie-pci-bridge: Already marked as PCIe-only. * pcie-port: all non-abstract subtypes of pcie-port are already marked as PCIe-only devices. 3) megasas-base Not all megasas devices are Conventional PCI devices, so the interface names are added to the subclasses registered by megasas_register_types(), according to information in the megasas_devices[] array. "megasas-gen2" already implements INTERFACE_PCIE_DEVICE, so add INTERFACE_CONVENTIONAL_PCI_DEVICE only to "megasas". Acked-by: Alberto Garcia Acked-by: John Snow Acked-by: Anthony PERARD Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * s/legacy/conventional/ * Suggested-by: Alex Williamson * Note about pcie-pci-bridge on commit message. * New devices: sungem, sunhme Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Stefano Stabellini Cc: Anthony Perard Cc: John Snow Cc: Alberto Garcia Cc: Aurelien Jarno Cc: Yongbok Kim Cc: Jiri Slaby Cc: Alexander Graf Cc: Marcel Apfelbaum Cc: Jason Wang Cc: Jiri Pirko Cc: "Hervé Poussineau" Cc: Peter Maydell Cc: David Gibson Cc: Hannes Reinecke Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Cc: Alex Williamson Cc: qemu-de...@nongnu.org Cc: xen-de...@lists.xenproject.org Cc: qemu-block@nongnu.org Cc: qemu-...@nongnu.org Cc: qemu-...@nongnu.org --- hw/acpi/piix4.c | 1 + hw/audio/ac97.c | 4 hw/audio/es1370.c | 4 hw/audio/intel-hda.c| 4 hw/char/serial-pci.c| 12 hw/display/cirrus_vga.c | 4 hw/display/qxl.c| 4 hw/display/sm501.c | 4 hw/display/vga-pci.c| 4 hw/display/vmware_vga.c | 4 hw/i2c/smbus_ich9.c | 4 hw/i386/amd_iommu.c | 4 hw/i386/kvm/pci-assign.c| 4 hw/i386/pc_piix.c | 4 hw/i386/xen/xen_platform.c | 4 hw/i386/xen/xen_pvdevice.c | 4 hw/ide/ich.c| 4 hw/ide/pci.c| 4 hw/ipack/tpci200.c | 4 hw/isa/i82378.c | 4 hw/isa/lpc_ich9.c | 1 + hw/isa/piix4.c | 4 hw/isa/vt82c686.c | 16 hw/mips/gt64xxx_pci.c | 4 hw/misc/edu.c | 5 + hw/misc/ivshmem.c | 4 hw/misc/macio/macio.c | 4 hw/misc/pci-testdev.c | 4 hw/net/e1000.c | 4 hw/net/eepro100.c | 4 hw/net/ne2000.c | 4 hw/net/pcnet-pci.c | 4 hw/net/rocker/rocker.c | 4 hw/net/rtl8139.c| 4 hw/net/sungem.c | 4 hw/net/sunhme.c | 4 hw/pci-bridge/dec.c | 8 hw/pci-bridge/i82801b11.c | 4 hw/pci-bridge/pci_bridge_dev.c | 1 + hw/pci-bridge/pci_expander_bridge.c | 8 hw/pci-host/apb.c | 8 hw/pci-host/bonito.c| 4 hw/pci-host/gpex.c | 4 hw/pci-host/grackle.c | 4 hw/pci-host/piix.c | 8 hw/pci-host/ppce500.c | 4 hw/pci-host/prep.c | 4 hw/pci-host/q35.c | 4 hw/pci-host/uninorth.c | 16 hw/pci-host/versatile.c | 4 hw/ppc/ppc4xx_pci.c | 4 hw/scsi/esp-pci.c | 4 hw/scsi/lsi53c895a.c| 4 hw/scsi/megasas.c | 4 hw/scsi/mptsas.c| 4 hw/sd/sdhci.c | 4 hw/sh4/sh_pci.c | 4 hw/sparc64/sun4u.c | 4 hw/usb/hcd-ehci-pci.c | 4 hw/usb/hcd-ohci.c | 4 hw/usb/hcd-uhci.c | 4 hw/vfio/pci-quirks.c
Re: [Qemu-block] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices
On Wed, Sep 27, 2017 at 04:56:34PM -0300, Eduardo Habkost wrote: > Add INTERFACE_CONVENTIONAL_PCI_DEVICE to all direct subtypes of > TYPE_PCI_DEVICE, except: > > 1) The ones that already have INTERFACE_PCIE_DEVICE set: > > * base-xhci > * e1000e > * nvme > * pvscsi > * vfio-pci > * virtio-pci > * vmxnet3 > > 2) base-pci-bridge > > Not all PCI bridges are Conventional PCI devices, so > INTERFACE_CONVENTIONAL_PCI_DEVICE is added only to the subtypes > that are actually Conventional PCI: > > * dec-21154-p2p-bridge > * i82801b11-bridge > * pbm-bridge > * pci-bridge > > The direct subtypes of base-pci-bridge not touched by this patch > are: > > * xilinx-pcie-root: Already marked as PCIe-only. > * pcie-pci-bridge: Already marked as PCIe-only. > * pcie-port: all non-abstract subtypes of pcie-port are already > marked as PCIe-only devices. > > 3) megasas-base > > Not all megasas devices are Conventional PCI devices, so the > interface names are added to the subclasses registered by > megasas_register_types(), according to information in the > megasas_devices[] array. > > "megasas-gen2" already implements INTERFACE_PCIE_DEVICE, so add > INTERFACE_CONVENTIONAL_PCI_DEVICE only to "megasas". > > Acked-by: Alberto Garcia > Acked-by: John Snow > Acked-by: Anthony PERARD > Signed-off-by: Eduardo Habkost Reviewed-by: David Gibson and for the ppc devices Acked-by: David Gibson > --- > Changes v1 -> v2: > * s/legacy/conventional/ > * Suggested-by: Alex Williamson > * Note about pcie-pci-bridge on commit message. > * New devices: sungem, sunhme > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Gerd Hoffmann > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: Stefano Stabellini > Cc: Anthony Perard > Cc: John Snow > Cc: Alberto Garcia > Cc: Aurelien Jarno > Cc: Yongbok Kim > Cc: Jiri Slaby > Cc: Alexander Graf > Cc: Marcel Apfelbaum > Cc: Jason Wang > Cc: Jiri Pirko > Cc: "Hervé Poussineau" > Cc: Peter Maydell > Cc: David Gibson > Cc: Hannes Reinecke > Cc: Mark Cave-Ayland > Cc: Artyom Tarasenko > Cc: Alex Williamson > Cc: qemu-de...@nongnu.org > Cc: xen-de...@lists.xenproject.org > Cc: qemu-block@nongnu.org > Cc: qemu-...@nongnu.org > Cc: qemu-...@nongnu.org > --- > hw/acpi/piix4.c | 1 + > hw/audio/ac97.c | 4 > hw/audio/es1370.c | 4 > hw/audio/intel-hda.c| 4 > hw/char/serial-pci.c| 12 > hw/display/cirrus_vga.c | 4 > hw/display/qxl.c| 4 > hw/display/sm501.c | 4 > hw/display/vga-pci.c| 4 > hw/display/vmware_vga.c | 4 > hw/i2c/smbus_ich9.c | 4 > hw/i386/amd_iommu.c | 4 > hw/i386/kvm/pci-assign.c| 4 > hw/i386/pc_piix.c | 4 > hw/i386/xen/xen_platform.c | 4 > hw/i386/xen/xen_pvdevice.c | 4 > hw/ide/ich.c| 4 > hw/ide/pci.c| 4 > hw/ipack/tpci200.c | 4 > hw/isa/i82378.c | 4 > hw/isa/lpc_ich9.c | 1 + > hw/isa/piix4.c | 4 > hw/isa/vt82c686.c | 16 > hw/mips/gt64xxx_pci.c | 4 > hw/misc/edu.c | 5 + > hw/misc/ivshmem.c | 4 > hw/misc/macio/macio.c | 4 > hw/misc/pci-testdev.c | 4 > hw/net/e1000.c | 4 > hw/net/eepro100.c | 4 > hw/net/ne2000.c | 4 > hw/net/pcnet-pci.c | 4 > hw/net/rocker/rocker.c | 4 > hw/net/rtl8139.c| 4 > hw/net/sungem.c | 4 > hw/net/sunhme.c | 4 > hw/pci-bridge/dec.c | 8 > hw/pci-bridge/i82801b11.c | 4 > hw/pci-bridge/pci_bridge_dev.c | 1 + > hw/pci-bridge/pci_expander_bridge.c | 8 > hw/pci-host/apb.c | 8 > hw/pci-host/bonito.c| 4 > hw/pci-host/gpex.c | 4 > hw/pci-host/grackle.c | 4 > hw/pci-host/piix.c | 8 > hw/pci-host/ppce500.c | 4 > hw/pci-host/prep.c | 4 > hw/pci-host/q35.c | 4 > hw/pci-host/uninorth.c | 16 > hw/pci-host/versatile.c | 4 > hw/ppc/ppc4xx_pci.c | 4 > hw/scsi/esp-pci.c | 4 > hw/scsi/lsi53c895a.c| 4 > hw/scsi/megasas.c | 4 > hw/scsi/mptsas.c| 4 > h
[Qemu-block] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices
Add INTERFACE_CONVENTIONAL_PCI_DEVICE to all direct subtypes of TYPE_PCI_DEVICE, except: 1) The ones that already have INTERFACE_PCIE_DEVICE set: * base-xhci * e1000e * nvme * pvscsi * vfio-pci * virtio-pci * vmxnet3 2) base-pci-bridge Not all PCI bridges are Conventional PCI devices, so INTERFACE_CONVENTIONAL_PCI_DEVICE is added only to the subtypes that are actually Conventional PCI: * dec-21154-p2p-bridge * i82801b11-bridge * pbm-bridge * pci-bridge The direct subtypes of base-pci-bridge not touched by this patch are: * xilinx-pcie-root: Already marked as PCIe-only. * pcie-pci-bridge: Already marked as PCIe-only. * pcie-port: all non-abstract subtypes of pcie-port are already marked as PCIe-only devices. 3) megasas-base Not all megasas devices are Conventional PCI devices, so the interface names are added to the subclasses registered by megasas_register_types(), according to information in the megasas_devices[] array. "megasas-gen2" already implements INTERFACE_PCIE_DEVICE, so add INTERFACE_CONVENTIONAL_PCI_DEVICE only to "megasas". Acked-by: Alberto Garcia Acked-by: John Snow Acked-by: Anthony PERARD Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * s/legacy/conventional/ * Suggested-by: Alex Williamson * Note about pcie-pci-bridge on commit message. * New devices: sungem, sunhme Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Stefano Stabellini Cc: Anthony Perard Cc: John Snow Cc: Alberto Garcia Cc: Aurelien Jarno Cc: Yongbok Kim Cc: Jiri Slaby Cc: Alexander Graf Cc: Marcel Apfelbaum Cc: Jason Wang Cc: Jiri Pirko Cc: "Hervé Poussineau" Cc: Peter Maydell Cc: David Gibson Cc: Hannes Reinecke Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Cc: Alex Williamson Cc: qemu-de...@nongnu.org Cc: xen-de...@lists.xenproject.org Cc: qemu-block@nongnu.org Cc: qemu-...@nongnu.org Cc: qemu-...@nongnu.org --- hw/acpi/piix4.c | 1 + hw/audio/ac97.c | 4 hw/audio/es1370.c | 4 hw/audio/intel-hda.c| 4 hw/char/serial-pci.c| 12 hw/display/cirrus_vga.c | 4 hw/display/qxl.c| 4 hw/display/sm501.c | 4 hw/display/vga-pci.c| 4 hw/display/vmware_vga.c | 4 hw/i2c/smbus_ich9.c | 4 hw/i386/amd_iommu.c | 4 hw/i386/kvm/pci-assign.c| 4 hw/i386/pc_piix.c | 4 hw/i386/xen/xen_platform.c | 4 hw/i386/xen/xen_pvdevice.c | 4 hw/ide/ich.c| 4 hw/ide/pci.c| 4 hw/ipack/tpci200.c | 4 hw/isa/i82378.c | 4 hw/isa/lpc_ich9.c | 1 + hw/isa/piix4.c | 4 hw/isa/vt82c686.c | 16 hw/mips/gt64xxx_pci.c | 4 hw/misc/edu.c | 5 + hw/misc/ivshmem.c | 4 hw/misc/macio/macio.c | 4 hw/misc/pci-testdev.c | 4 hw/net/e1000.c | 4 hw/net/eepro100.c | 4 hw/net/ne2000.c | 4 hw/net/pcnet-pci.c | 4 hw/net/rocker/rocker.c | 4 hw/net/rtl8139.c| 4 hw/net/sungem.c | 4 hw/net/sunhme.c | 4 hw/pci-bridge/dec.c | 8 hw/pci-bridge/i82801b11.c | 4 hw/pci-bridge/pci_bridge_dev.c | 1 + hw/pci-bridge/pci_expander_bridge.c | 8 hw/pci-host/apb.c | 8 hw/pci-host/bonito.c| 4 hw/pci-host/gpex.c | 4 hw/pci-host/grackle.c | 4 hw/pci-host/piix.c | 8 hw/pci-host/ppce500.c | 4 hw/pci-host/prep.c | 4 hw/pci-host/q35.c | 4 hw/pci-host/uninorth.c | 16 hw/pci-host/versatile.c | 4 hw/ppc/ppc4xx_pci.c | 4 hw/scsi/esp-pci.c | 4 hw/scsi/lsi53c895a.c| 4 hw/scsi/megasas.c | 4 hw/scsi/mptsas.c| 4 hw/sd/sdhci.c | 4 hw/sh4/sh_pci.c | 4 hw/sparc64/sun4u.c | 4 hw/usb/hcd-ehci-pci.c | 4 hw/usb/hcd-ohci.c | 4 hw/usb/hcd-uhci.c | 4 hw/vfio/pci-quirks.c| 4 hw/watchdog/wdt_i6300esb.c | 4 hw/xen/xen_pt.c | 4