diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-27 16:56:34 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-10-15 05:54:43 +0300 |
commit | fd3b02c8896d597dd8b9e053dec579cf0386aee1 (patch) | |
tree | e46c05a6d4ff122cb74b669f1423555dd1808161 /hw/pci-host | |
parent | 71d787677d0cacea846dc851c3e56ad076d59c04 (diff) | |
download | qemu-fd3b02c8896d597dd8b9e053dec579cf0386aee1.zip qemu-fd3b02c8896d597dd8b9e053dec579cf0386aee1.tar.gz qemu-fd3b02c8896d597dd8b9e053dec579cf0386aee1.tar.bz2 |
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 <berto@igalia.com>
Acked-by: John Snow <jsnow@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r-- | hw/pci-host/apb.c | 8 | ||||
-rw-r--r-- | hw/pci-host/bonito.c | 4 | ||||
-rw-r--r-- | hw/pci-host/gpex.c | 4 | ||||
-rw-r--r-- | hw/pci-host/grackle.c | 4 | ||||
-rw-r--r-- | hw/pci-host/piix.c | 8 | ||||
-rw-r--r-- | hw/pci-host/ppce500.c | 4 | ||||
-rw-r--r-- | hw/pci-host/prep.c | 4 | ||||
-rw-r--r-- | hw/pci-host/q35.c | 4 | ||||
-rw-r--r-- | hw/pci-host/uninorth.c | 16 | ||||
-rw-r--r-- | hw/pci-host/versatile.c | 4 |
10 files changed, 60 insertions, 0 deletions
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c index b709456..1edf57f 100644 --- a/hw/pci-host/apb.c +++ b/hw/pci-host/apb.c @@ -836,6 +836,10 @@ static const TypeInfo pbm_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = pbm_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void pbm_host_class_init(ObjectClass *klass, void *data) @@ -883,6 +887,10 @@ static const TypeInfo pbm_pci_bridge_info = { .parent = TYPE_PCI_BRIDGE, .class_init = pbm_pci_bridge_class_init, .instance_size = sizeof(PBMPCIBridge), + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void pbm_iommu_memory_region_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 89133a9..9f61e27 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -833,6 +833,10 @@ static const TypeInfo bonito_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIBonitoState), .class_init = bonito_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void bonito_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c index be25245..4090793 100644 --- a/hw/pci-host/gpex.c +++ b/hw/pci-host/gpex.c @@ -166,6 +166,10 @@ static const TypeInfo gpex_root_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(GPEXRootState), .class_init = gpex_root_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void gpex_register(void) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 2e281f6..38cd279 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c @@ -142,6 +142,10 @@ static const TypeInfo grackle_pci_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = grackle_pci_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void pci_grackle_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index dec345f..a7e2256 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -696,6 +696,10 @@ static const TypeInfo piix3_pci_type_info = { .instance_size = sizeof(PIIX3State), .abstract = true, .class_init = pci_piix3_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void piix3_class_init(ObjectClass *klass, void *data) @@ -750,6 +754,10 @@ static const TypeInfo i440fx_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCII440FXState), .class_init = i440fx_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; /* IGD Passthrough Host Bridge. */ diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index becc0ee..39cd244 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -516,6 +516,10 @@ static const TypeInfo e500_host_bridge_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PPCE500PCIBridgeState), .class_init = e500_host_bridge_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static Property pcihost_properties[] = { diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c index 8b293ba..92eed0f 100644 --- a/hw/pci-host/prep.c +++ b/hw/pci-host/prep.c @@ -372,6 +372,10 @@ static const TypeInfo raven_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(RavenPCIState), .class_init = raven_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static Property raven_pcihost_properties[] = { diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 1ff648e..ddaa7d1 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -591,6 +591,10 @@ static const TypeInfo mch_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(MCHPCIState), .class_init = mch_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void q35_register(void) diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index 6cf5e59..ea5c265 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -374,6 +374,10 @@ static const TypeInfo unin_main_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = unin_main_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void u3_agp_pci_host_class_init(ObjectClass *klass, void *data) @@ -398,6 +402,10 @@ static const TypeInfo u3_agp_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = u3_agp_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void unin_agp_pci_host_class_init(ObjectClass *klass, void *data) @@ -422,6 +430,10 @@ static const TypeInfo unin_agp_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = unin_agp_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void unin_internal_pci_host_class_init(ObjectClass *klass, void *data) @@ -446,6 +458,10 @@ static const TypeInfo unin_internal_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = unin_internal_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static void pci_unin_main_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index aa1fdf7..6394a52 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -487,6 +487,10 @@ static const TypeInfo versatile_pci_host_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIDevice), .class_init = versatile_pci_host_class_init, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, }; static Property pci_vpb_properties[] = { |