From d61a363d3e801fcfdba0767ba0f2b44cd458be37 Mon Sep 17 00:00:00 2001 From: Yoni Bettan Date: Tue, 16 Jan 2018 14:34:56 +0200 Subject: pci: removed the is_express field since a uniform interface was inserted according to Eduardo Habkost's commit fd3b02c889 all PCIEs now implement INTERFACE_PCIE_DEVICE so we don't need is_express field anymore. Devices that implements only INTERFACE_PCIE_DEVICE (is_express == 1) or devices that implements only INTERFACE_CONVENTIONAL_PCI_DEVICE (is_express == 0) where not affected by the change. The only devices that were affected are those that are hybrid and also had (is_express == 1) - therefor only: - hw/vfio/pci.c - hw/usb/hcd-xhci.c - hw/xen/xen_pt.c For those 3 I made sure that QEMU_PCI_CAP_EXPRESS is on in instance_init() Reviewed-by: Marcel Apfelbaum Reviewed-by: Eduardo Habkost Signed-off-by: Yoni Bettan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/vfio/pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hw/vfio') diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 879510c046..b33c5e8a03 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3113,6 +3113,10 @@ static void vfio_instance_init(Object *obj) vdev->host.function = ~0U; vdev->nv_gpudirect_clique = 0xFF; + + /* QEMU_PCI_CAP_EXPRESS initialization does not depend on QEMU command + * line, therefore, no need to wait to realize like other devices */ + pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; } static Property vfio_pci_dev_properties[] = { @@ -3171,7 +3175,6 @@ static void vfio_pci_dev_class_init(ObjectClass *klass, void *data) pdc->exit = vfio_exitfn; pdc->config_read = vfio_pci_read_config; pdc->config_write = vfio_pci_write_config; - pdc->is_express = 1; /* We might be */ } static const TypeInfo vfio_pci_dev_info = { -- cgit v1.2.3