@samitouri / QOSamiQemu / commits / 51859dcf2b

hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition

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é <philmd@linaro.org> Message-ID: <20250501210456.89071-8-philmd@linaro.org> [thuth: Don't remove pci_set_long(), execute it always instead] Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260225092024.794595-7-thuth@redhat.com>

Philippe Mathieu-Daudé committed Feb 25, 2026 at 10:20 UTC 51859dcf2b76b77092d7c88561e85c119c3bd1e5
3 files changed +2 -8
hw/pci/pci.c
-2
@@ -84,8 +84,6 @@ static const Property pci_props[] = {
84 QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false),
85 DEFINE_PROP_BIT("x-pcie-lnksta-dllla", PCIDevice, cap_present,
86 QEMU_PCIE_LNKSTA_DLLLA_BITNR, true),
87 - DEFINE_PROP_BIT("x-pcie-extcap-init", PCIDevice, cap_present,
88 - QEMU_PCIE_EXTCAP_INIT_BITNR, true),
87 DEFINE_PROP_STRING("failover_pair_id", PCIDevice,
88 failover_pair_id),
89 DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0),
hw/pci/pcie.c
+2 -4
@@ -250,10 +250,8 @@ int pcie_cap_init(PCIDevice *dev, uint8_t offset,
250
251 pci_set_word(dev->wmask + pos + PCI_EXP_DEVCTL2, PCI_EXP_DEVCTL2_EETLPPB);
252
253 - if (dev->cap_present & QEMU_PCIE_EXTCAP_INIT) {
254 - /* read-only to behave like a 'NULL' Extended Capability Header */
255 - pci_set_long(dev->wmask + PCI_CONFIG_SPACE_SIZE, 0);
256 - }
253 + /* read-only to behave like a 'NULL' Extended Capability Header */
254 + pci_set_long(dev->wmask + PCI_CONFIG_SPACE_SIZE, 0);
255
256 return pos;
257 }
include/hw/pci/pci.h
-2
@@ -219,8 +219,6 @@ enum {
219 /* Link active status in endpoint capability is always set */
220 #define QEMU_PCIE_LNKSTA_DLLLA_BITNR 8
221 QEMU_PCIE_LNKSTA_DLLLA = (1 << QEMU_PCIE_LNKSTA_DLLLA_BITNR),
222 -#define QEMU_PCIE_EXTCAP_INIT_BITNR 9
223 - QEMU_PCIE_EXTCAP_INIT = (1 << QEMU_PCIE_EXTCAP_INIT_BITNR),
222 #define QEMU_PCIE_CXL_BITNR 10
223 QEMU_PCIE_CAP_CXL = (1 << QEMU_PCIE_CXL_BITNR),
224 #define QEMU_PCIE_ERR_UNC_MASK_BITNR 11