All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PATCH 2/2] hw/virtio: Remove hw_compat_4_1[] array and "x-pcie-flr-init" from virtio-pci
Date: Fri, 27 Nov 2026 15:40:59 +0100	[thread overview]
Message-ID: <20261127144059.278754-3-thuth@redhat.com> (raw)
In-Reply-To: <20261127144059.278754-1-thuth@redhat.com>

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>
---
 include/hw/core/boards.h       |  3 ---
 include/hw/virtio/virtio-pci.h |  4 ----
 hw/core/machine.c              |  5 -----
 hw/virtio/virtio-pci.c         | 13 +++----------
 4 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h
index d0e4ad98201..a45495db81f 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 f033237035a..b2738ceafac 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)
 
diff --git a/hw/core/machine.c b/hw/core/machine.c
index ed9bf8f5008..8342a3bb94c 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 fe2e545c302..9ff8b63d090 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),
 };
-- 
2.56.1



  parent reply	other threads:[~2026-11-27 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 14:40 [PATCH for-12.0 0/2] Remove code of the obsolete pc-q35-4.1 and pc-i440fx-4.1 machines Thomas Huth
2026-11-27 14:40 ` [PATCH 1/2] hw/i386: Remove the " Thomas Huth
2026-11-30 15:54   ` Philippe Mathieu-Daudé
2026-11-27 14:40 ` Thomas Huth [this message]
2026-11-30 15:53   ` [PATCH 2/2] hw/virtio: Remove hw_compat_4_1[] array and "x-pcie-flr-init" from virtio-pci Philippe Mathieu-Daudé
2026-11-30 17:07 ` [PATCH for-12.0 0/2] Remove code of the obsolete pc-q35-4.1 and pc-i440fx-4.1 machines Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261127144059.278754-3-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.