From: Philippe Mathieu-Daudé Date: Thu, 8 Jan 2026 03:30:43 +0000 (+0800) Subject: hw/virtio/virtio-mmio: Remove VirtIOMMIOProxy::format_transport_address field X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5964220631f32e4bf4175c2a77d4d5ed3330c520;p=thirdparty%2Fqemu.git hw/virtio/virtio-mmio: Remove VirtIOMMIOProxy::format_transport_address field 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(). Reviewed-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Zhao Liu Link: https://lore.kernel.org/r/20260108033051.777361-20-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini --- diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 0b0412b22f..742ca3d3e4 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 1eab3c0dec..1644d09810 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];