On Wed, 3 Dec 2025 00:28:27 +0800
Zhao Liu <zhao1.liu@intel.com> wrote:
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> The VirtIOMMIOProxy::format_transport_address boolean was only set
> in the hw_compat_2_6[] array, via the 'format_transport_address=off'
> property. We removed all machines using that array, lets remove
> that property, simplifying virtio_mmio_bus_get_dev_path().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/virtio/virtio-mmio.c | 15 ---------------
> include/hw/virtio/virtio-mmio.h | 1 -
> 2 files changed, 16 deletions(-)
>
> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> index c05c00bcd4a7..c779836201d5 100644
> --- a/hw/virtio/virtio-mmio.c
> +++ b/hw/virtio/virtio-mmio.c
> @@ -764,8 +764,6 @@ static void virtio_mmio_pre_plugged(DeviceState *d, Error **errp)
> /* virtio-mmio device */
>
> static const Property virtio_mmio_properties[] = {
> - DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy,
> - format_transport_address, true),
> DEFINE_PROP_BOOL("force-legacy", VirtIOMMIOProxy, legacy, true),
> DEFINE_PROP_BIT("ioeventfd", VirtIOMMIOProxy, flags,
> VIRTIO_IOMMIO_FLAG_USE_IOEVENTFD_BIT, true),
> @@ -827,19 +825,6 @@ static char *virtio_mmio_bus_get_dev_path(DeviceState *dev)
> virtio_mmio_proxy = VIRTIO_MMIO(virtio_mmio_bus->parent);
> proxy_path = qdev_get_dev_path(DEVICE(virtio_mmio_proxy));
>
> - /*
> - * If @format_transport_address is false, then we just perform the same as
> - * virtio_bus_get_dev_path(): we delegate the address formatting for the
> - * device on the virtio-mmio bus to the bus that the virtio-mmio proxy
> - * (i.e., the device that implements the virtio-mmio bus) resides on. In
> - * this case the base address of the virtio-mmio transport will be
> - * invisible.
> - */
> - if (!virtio_mmio_proxy->format_transport_address) {
> - return proxy_path;
> - }
> -
> - /* Otherwise, we append the base address of the transport. */
> section = memory_region_find(&virtio_mmio_proxy->iomem, 0, 0x200);
> assert(section.mr);
>
> diff --git a/include/hw/virtio/virtio-mmio.h b/include/hw/virtio/virtio-mmio.h
> index aa492620228d..8b19ec2291ac 100644
> --- a/include/hw/virtio/virtio-mmio.h
> +++ b/include/hw/virtio/virtio-mmio.h
> @@ -66,7 +66,6 @@ struct VirtIOMMIOProxy {
> uint32_t guest_page_shift;
> /* virtio-bus */
> VirtioBusState bus;
> - bool format_transport_address;
> /* Fields only used for non-legacy (v2) devices */
> uint32_t guest_features[2];
> VirtIOMMIOQueue vqs[VIRTIO_QUEUE_MAX];