Commit 2054d12c91 for qemu.org
commit 2054d12c91af35feced5fda5ecd6f10839f24b6b
Author: Thomas Huth <thuth@redhat.com>
Date: Fri Nov 27 15:40:59 2026 +0100
hw/virtio: Remove hw_compat_4_1[] array and "x-pcie-flr-init" from virtio-pci
There is no machine left that is using hw_compat_4_1[], so the array
and the "virtio-pci"->"x-pcie-flr-init" setting can be removed now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261127144059.278754-3-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
diff --git a/hw/core/machine.c b/hw/core/machine.c
index ed9bf8f500..8342a3bb94 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -235,11 +235,6 @@ GlobalProperty hw_compat_4_2[] = {
};
const size_t hw_compat_4_2_len = G_N_ELEMENTS(hw_compat_4_2);
-GlobalProperty hw_compat_4_1[] = {
- { "virtio-pci", "x-pcie-flr-init", "off" },
-};
-const size_t hw_compat_4_1_len = G_N_ELEMENTS(hw_compat_4_1);
-
MachineState *current_machine;
static char *machine_get_kernel(Object *obj, Error **errp)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index fe2e545c30..9ff8b63d09 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -799,10 +799,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
struct virtio_pci_cfg_cap *cfg;
pci_default_write_config(pci_dev, address, val, len);
-
- if (proxy->flags & VIRTIO_PCI_FLAG_INIT_FLR) {
- pcie_cap_flr_write_config(pci_dev, address, val, len);
- }
+ pcie_cap_flr_write_config(pci_dev, address, val, len);
if (proxy->flags & VIRTIO_PCI_FLAG_ATS) {
pcie_ats_config_write(pci_dev, address, val, len);
@@ -2309,10 +2306,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
proxy->last_pcie_cap_offset += PCI_EXT_CAP_ATS_SIZEOF;
}
- if (proxy->flags & VIRTIO_PCI_FLAG_INIT_FLR) {
- /* Set Function Level Reset capability bit */
- pcie_cap_flr_init(pci_dev);
- }
+ /* Set Function Level Reset capability bit */
+ pcie_cap_flr_init(pci_dev);
} else {
/*
* make future invocations of pci_is_express() return false
@@ -2418,8 +2413,6 @@ static const Property virtio_pci_properties[] = {
VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT, true),
DEFINE_PROP_BIT("x-pcie-pm-no-soft-reset", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT, false),
- DEFINE_PROP_BIT("x-pcie-flr-init", VirtIOPCIProxy, flags,
- VIRTIO_PCI_FLAG_INIT_FLR_BIT, true),
DEFINE_PROP_BIT("aer", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_AER_BIT, false),
};
diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h
index d0e4ad9820..a45495db81 100644
--- a/include/hw/core/boards.h
+++ b/include/hw/core/boards.h
@@ -893,7 +893,4 @@ extern const size_t hw_compat_5_0_len;
extern GlobalProperty hw_compat_4_2[];
extern const size_t hw_compat_4_2_len;
-extern GlobalProperty hw_compat_4_1[];
-extern const size_t hw_compat_4_1_len;
-
#endif
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index f033237035..b2738ceafa 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -35,7 +35,6 @@ enum {
VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT,
VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT,
VIRTIO_PCI_FLAG_ATS_BIT,
- VIRTIO_PCI_FLAG_INIT_FLR_BIT,
VIRTIO_PCI_FLAG_AER_BIT,
VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT,
VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT,
@@ -64,9 +63,6 @@ enum {
#define VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET \
(1 << VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT)
-/* Init Function Level Reset capability */
-#define VIRTIO_PCI_FLAG_INIT_FLR (1 << VIRTIO_PCI_FLAG_INIT_FLR_BIT)
-
/* Advanced Error Reporting capability */
#define VIRTIO_PCI_FLAG_AER (1 << VIRTIO_PCI_FLAG_AER_BIT)