Message ID | 20250115232247.30364-11-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | hw/i386/pc: Remove deprecated 2.4 and 2.5 PC machines | expand |
On Thu, Jan 16, 2025 at 12:22:36AM +0100, Philippe Mathieu-Daudé wrote: > VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the > hw_compat_2_4[] array, via the 'x-disable-pcie=false' > property. We removed all machines using that array, > lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > include/hw/virtio/virtio-pci.h | 4 ---- > hw/virtio/virtio-pci.c | 5 +---- > 2 files changed, 1 insertion(+), 8 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel
On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: > VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the > hw_compat_2_4[] array, via the 'x-disable-pcie=false' > property. We removed all machines using that array, > lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > include/hw/virtio/virtio-pci.h | 4 ---- > hw/virtio/virtio-pci.c | 5 +---- > 2 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h > index dd6eb9a4fc7..1ca7419cd43 100644 > --- a/include/hw/virtio/virtio-pci.h > +++ b/include/hw/virtio/virtio-pci.h > @@ -33,7 +33,6 @@ enum { > VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, > VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, > VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, > - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, > VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, > VIRTIO_PCI_FLAG_ATS_BIT, > VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, I assume it's ok that the other following bits change their value here? If so: Reviewed-by: Thomas Huth <thuth@redhat.com>
On 17/1/25 10:08, Thomas Huth wrote: > On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: >> VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the >> hw_compat_2_4[] array, via the 'x-disable-pcie=false' >> property. We removed all machines using that array, >> lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. >> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >> --- >> include/hw/virtio/virtio-pci.h | 4 ---- >> hw/virtio/virtio-pci.c | 5 +---- >> 2 files changed, 1 insertion(+), 8 deletions(-) >> >> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/ >> virtio-pci.h >> index dd6eb9a4fc7..1ca7419cd43 100644 >> --- a/include/hw/virtio/virtio-pci.h >> +++ b/include/hw/virtio/virtio-pci.h >> @@ -33,7 +33,6 @@ enum { >> VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, >> VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, >> VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, >> - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, >> VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, >> VIRTIO_PCI_FLAG_ATS_BIT, >> VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, > > I assume it's ok that the other following bits change their value here? I followed previous commit 9a4c0e220d8 ("hw/virtio-pci: fix virtio behaviour"): diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h index e4548c2f970..25fbf8a375d 100644 --- a/hw/virtio/virtio-pci.h +++ b/hw/virtio/virtio-pci.h @@ -61,8 +61,6 @@ typedef struct VirtioBusClass VirtioPCIBusClass; enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, - VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT, - VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT, VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, > > If so: > Reviewed-by: Thomas Huth <thuth@redhat.com> Thanks!
On 17/01/2025 17.43, Philippe Mathieu-Daudé wrote: > On 17/1/25 10:08, Thomas Huth wrote: >> On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: >>> VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the >>> hw_compat_2_4[] array, via the 'x-disable-pcie=false' >>> property. We removed all machines using that array, >>> lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. >>> >>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >>> --- >>> include/hw/virtio/virtio-pci.h | 4 ---- >>> hw/virtio/virtio-pci.c | 5 +---- >>> 2 files changed, 1 insertion(+), 8 deletions(-) >>> >>> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/ virtio- >>> pci.h >>> index dd6eb9a4fc7..1ca7419cd43 100644 >>> --- a/include/hw/virtio/virtio-pci.h >>> +++ b/include/hw/virtio/virtio-pci.h >>> @@ -33,7 +33,6 @@ enum { >>> VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, >>> VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, >>> VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, >>> - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, >>> VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, >>> VIRTIO_PCI_FLAG_ATS_BIT, >>> VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, >> >> I assume it's ok that the other following bits change their value here? > > I followed previous commit 9a4c0e220d8 ("hw/virtio-pci: > fix virtio behaviour"): > > diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h > index e4548c2f970..25fbf8a375d 100644 > --- a/hw/virtio/virtio-pci.h > +++ b/hw/virtio/virtio-pci.h > @@ -61,8 +61,6 @@ typedef struct VirtioBusClass VirtioPCIBusClass; > enum { > VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, > VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, > - VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT, > - VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT, > VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, > VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, > VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, Ok, if it has been done before and nobody complained, the exact numbering likely doesn't matter here :-) Thomas
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index dd6eb9a4fc7..1ca7419cd43 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -33,7 +33,6 @@ enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, VIRTIO_PCI_FLAG_ATS_BIT, VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, @@ -53,9 +52,6 @@ enum { * vcpu thread using ioeventfd for some devices. */ #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT) -/* virtio version flags */ -#define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT) - /* have pio notification for modern device ? */ #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8dca3ae73e6..2f2c6b13863 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2347,8 +2347,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false), DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), - DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false), DEFINE_PROP_BIT("page-per-vq", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), DEFINE_PROP_BOOL("x-ignore-backend-features", VirtIOPCIProxy, @@ -2377,8 +2375,7 @@ static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp) VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev); PCIDevice *pci_dev = &proxy->pci_dev; - if (!(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) && - virtio_pci_modern(proxy)) { + if (virtio_pci_modern(proxy)) { pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; }
VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the hw_compat_2_4[] array, via the 'x-disable-pcie=false' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-)