aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-12-05 17:57:04 -0200
committerMichael S. Tsirkin <mst@redhat.com>2018-12-19 16:48:16 -0500
commitf6e501a28ef9b69f6df6252160aa87876cc92a1a (patch)
treec227e3e7340960575645cf63a2ceb8209f1a7272 /hw/xtensa
parenta4ee4c8baa37154f42b4dc6a13fee79268d15238 (diff)
downloadqemu-f6e501a28ef9b69f6df6252160aa87876cc92a1a.zip
qemu-f6e501a28ef9b69f6df6252160aa87876cc92a1a.tar.gz
qemu-f6e501a28ef9b69f6df6252160aa87876cc92a1a.tar.bz2
virtio: Provide version-specific variants of virtio PCI devices
Many of the current virtio-*-pci device types actually represent 3 different types of devices: * virtio 1.0 non-transitional devices * virtio 1.0 transitional devices * virtio 0.9 ("legacy device" in virtio 1.0 terminology) That would be just an annoyance if it didn't break our device/bus compatibility QMP interfaces. With these multi-purpose device types, there's no way to tell management software that transitional devices and legacy devices require a Conventional PCI bus. The multi-purpose device types would also prevent us from telling management software what's the PCI vendor/device ID for them, because their PCI IDs change at runtime depending on the bus where they were plugged. This patch adds separate device types for each of those virtio device flavors: - virtio-*-pci: the existing multi-purpose device types - Configurable using `disable-legacy` and `disable-modern` properties - Legacy driver support is automatically enabled/disabled depending on the bus where it is plugged - Supports Conventional PCI and PCI Express buses (but Conventional PCI is incompatible with disable-legacy=off) - Changes PCI vendor/device IDs at runtime - virtio-*-pci-transitional: virtio-1.0 device supporting legacy drivers - Supports Conventional PCI buses only, because it has a PIO BAR - virtio-*-pci-non-transitional: modern-only - Supports both Conventional PCI and PCI Express buses The existing TYPE_* macros for these types will point to an abstract base type, so existing casts in the code will keep working for all variants. A simple test script (tests/acceptance/virtio_version.py) is included, to check if the new device types are equivalent to using the `disable-legacy` and `disable-modern` options. Acked-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/xtensa')
0 files changed, 0 insertions, 0 deletions