aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2017-09-27 16:56:31 -0300
committerMichael S. Tsirkin <mst@redhat.com>2017-10-15 05:54:42 +0300
commit619f02aefc587e5e2821cd84b584eba199c97c9e (patch)
tree892999273b25a59ba744eccbde056df3d2d58df5 /hw/pci
parenta6c242aaf52409ea827665e6f5f84b446d17a859 (diff)
downloadqemu-619f02aefc587e5e2821cd84b584eba199c97c9e.zip
qemu-619f02aefc587e5e2821cd84b584eba199c97c9e.tar.gz
qemu-619f02aefc587e5e2821cd84b584eba199c97c9e.tar.bz2
pci: conventional-pci-device and pci-express-device interfaces
Those two interfaces will be used to indicate which device types support Conventional PCI or PCI Express buses. Management software will be able to use the qom-list-types QMP command to query that information. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-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')
-rw-r--r--hw/pci/pci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 1e6fb88..1b08e18 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -170,6 +170,16 @@ static const TypeInfo pci_bus_info = {
.class_init = pci_bus_class_init,
};
+static const TypeInfo pcie_interface_info = {
+ .name = INTERFACE_PCIE_DEVICE,
+ .parent = TYPE_INTERFACE,
+};
+
+static const TypeInfo conventional_pci_interface_info = {
+ .name = INTERFACE_CONVENTIONAL_PCI_DEVICE,
+ .parent = TYPE_INTERFACE,
+};
+
static const TypeInfo pcie_bus_info = {
.name = TYPE_PCIE_BUS,
.parent = TYPE_PCI_BUS,
@@ -2667,6 +2677,8 @@ static void pci_register_types(void)
{
type_register_static(&pci_bus_info);
type_register_static(&pcie_bus_info);
+ type_register_static(&conventional_pci_interface_info);
+ type_register_static(&pcie_interface_info);
type_register_static(&pci_device_type_info);
}