From: Philippe Mathieu-Daudé <[email protected]> QEMU_PCIE_EXTCAP_INIT was only used by the hw_compat_2_8[] array, via the 'x-pcie-extcap-init=off' property. We removed all machines using that array, let's remove all the code around QEMU_PCIE_EXTCAP_INIT.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> [thuth: Don't remove pci_set_long(), execute it always instead] Signed-off-by: Thomas Huth <[email protected]> --- include/hw/pci/pci.h | 2 -- hw/pci/pci.c | 2 -- hw/pci/pcie.c | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index d9835dfd0dd..64141e92fec 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -219,8 +219,6 @@ enum { /* Link active status in endpoint capability is always set */ #define QEMU_PCIE_LNKSTA_DLLLA_BITNR 8 QEMU_PCIE_LNKSTA_DLLLA = (1 << QEMU_PCIE_LNKSTA_DLLLA_BITNR), -#define QEMU_PCIE_EXTCAP_INIT_BITNR 9 - QEMU_PCIE_EXTCAP_INIT = (1 << QEMU_PCIE_EXTCAP_INIT_BITNR), #define QEMU_PCIE_CXL_BITNR 10 QEMU_PCIE_CAP_CXL = (1 << QEMU_PCIE_CXL_BITNR), #define QEMU_PCIE_ERR_UNC_MASK_BITNR 11 diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 90d6d71efdc..6399ebd41cb 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -84,8 +84,6 @@ static const Property pci_props[] = { QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false), DEFINE_PROP_BIT("x-pcie-lnksta-dllla", PCIDevice, cap_present, QEMU_PCIE_LNKSTA_DLLLA_BITNR, true), - DEFINE_PROP_BIT("x-pcie-extcap-init", PCIDevice, cap_present, - QEMU_PCIE_EXTCAP_INIT_BITNR, true), DEFINE_PROP_STRING("failover_pair_id", PCIDevice, failover_pair_id), DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0), diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index cae5061e69c..4622c75e48c 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -250,10 +250,8 @@ int pcie_cap_init(PCIDevice *dev, uint8_t offset, pci_set_word(dev->wmask + pos + PCI_EXP_DEVCTL2, PCI_EXP_DEVCTL2_EETLPPB); - if (dev->cap_present & QEMU_PCIE_EXTCAP_INIT) { - /* read-only to behave like a 'NULL' Extended Capability Header */ - pci_set_long(dev->wmask + PCI_CONFIG_SPACE_SIZE, 0); - } + /* read-only to behave like a 'NULL' Extended Capability Header */ + pci_set_long(dev->wmask + PCI_CONFIG_SPACE_SIZE, 0); return pos; } -- 2.53.0
