mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
virtio-blk: replace x-iothread with iothread link property
Up until now -device virtio-blk-pci,x-iothread=<id> was used to assign an IOThread. This was a temporary solution while we cleaned up QOM link properties. This patch switches over to a QOM link property since it is now possible to restrict the setter to unrealized instances and automatically unref the IOThread when the virtio-blk-pci device is freed. Since the "iothread" property is a QOM property and not a qdev property, we must alias it explicitly for virtio-blk-pci, as well as CCW and s390-virtio. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
32a877e405
commit
467b3f33e9
4 changed files with 17 additions and 1 deletions
|
@ -181,6 +181,8 @@ static void s390_virtio_blk_instance_init(Object *obj)
|
|||
object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
|
||||
object_unref(OBJECT(&dev->vdev));
|
||||
qdev_alias_all_properties(DEVICE(&dev->vdev), obj);
|
||||
object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev),"iothread",
|
||||
&error_abort);
|
||||
}
|
||||
|
||||
static int s390_virtio_serial_init(VirtIOS390Device *s390_dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue