summary refs log tree commit diff stats
path: root/include/hw/qdev-properties.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-22 11:42:22 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-23 16:07:07 +0200
commit84b0475ced86d7e0f182f0753b23f5977fdb201e (patch)
treeb1c323120e3f990ff943145424daec85dc7a7e5b /include/hw/qdev-properties.h
parent1bc133365e39feb2a37747d47de281927ce1b853 (diff)
downloadfocaccia-qemu-84b0475ced86d7e0f182f0753b23f5977fdb201e.tar.gz
focaccia-qemu-84b0475ced86d7e0f182f0753b23f5977fdb201e.zip
qdev: Reject drive property override
qdev_prop_set_drive() screws up when the property already has a
non-null value: it neglects to release the old value.  Both the old
and the new backend become attached to the same device.

Example (taken from iotest 172): -fda ... -drive if=none,... -global
floppy.drive=none0.

Special case: attempting to use the same backend both times fails.
Example (also from iotest 172): -fda ... -global floppy.drive=floppy0.

Yet another example: -device with multiple drive=... (but not
device_add, which silently drops all but the last duplicate property).

Perhaps drive property override could be made to work.  Perhaps it
should.  I can't afford the time to figure this out now.  What I can
do is reject usage that leaves backends in unhealthy states.  For what
it's worth, we've long done the same for netdev properties.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200622094227.1271650-12-armbru@redhat.com>
Diffstat (limited to 'include/hw/qdev-properties.h')
0 files changed, 0 insertions, 0 deletions