hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition
VIRTIO_PCI_FLAG_INIT_LNKCTL was only used by the hw_compat_2_8[] array, via the 'x-pcie-lnkctl-init=off' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_INIT_LNKCTL (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250501210456.89071-10-philmd@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260225092024.794595-9-thuth@redhat.com>
Philippe Mathieu-Daudé committed
Feb 25, 2026 at 10:20 UTC
05d13867d920d98636852e1d96084eed74883f25
2 files changed
+2
-10
hw/virtio/virtio-pci.c
+2
-6
@@ -2310,10 +2310,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
2310
/* Init error enabling flags */
2311
pcie_cap_deverr_init(pci_dev);
2312
2313
- if (proxy->flags & VIRTIO_PCI_FLAG_INIT_LNKCTL) {
2314
- /* Init Link Control Register */
2315
- pcie_cap_lnkctl_init(pci_dev);
2316
- }
2313
+ /* Init Link Control Register */
2314
+ pcie_cap_lnkctl_init(pci_dev);
2315
2316
if (proxy->flags & VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET) {
2317
pci_set_word(pci_dev->config + pos + PCI_PM_CTRL,
@@ -2444,8 +2442,6 @@ static const Property virtio_pci_properties[] = {
2442
VIRTIO_PCI_FLAG_ATS_BIT, false),
2443
DEFINE_PROP_BIT("x-ats-page-aligned", VirtIOPCIProxy, flags,
2444
VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT, true),
2447
- DEFINE_PROP_BIT("x-pcie-lnkctl-init", VirtIOPCIProxy, flags,
2448
- VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT, true),
2445
DEFINE_PROP_BIT("x-pcie-pm-init", VirtIOPCIProxy, flags,
2446
VIRTIO_PCI_FLAG_INIT_PM_BIT, true),
2447
DEFINE_PROP_BIT("x-pcie-pm-no-soft-reset", VirtIOPCIProxy, flags,
include/hw/virtio/virtio-pci.h
-4
@@ -35,7 +35,6 @@ enum {
35
VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT,
36
VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT,
37
VIRTIO_PCI_FLAG_ATS_BIT,
38
- VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT,
38
VIRTIO_PCI_FLAG_INIT_PM_BIT,
39
VIRTIO_PCI_FLAG_INIT_FLR_BIT,
40
VIRTIO_PCI_FLAG_AER_BIT,
@@ -62,9 +61,6 @@ enum {
61
/* address space translation service */
62
#define VIRTIO_PCI_FLAG_ATS (1 << VIRTIO_PCI_FLAG_ATS_BIT)
63
65
-/* Init Link Control register */
66
-#define VIRTIO_PCI_FLAG_INIT_LNKCTL (1 << VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT)
67
-
64
/* Init Power Management */
65
#define VIRTIO_PCI_FLAG_INIT_PM (1 << VIRTIO_PCI_FLAG_INIT_PM_BIT)
66