aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-08-06 13:35:06 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-30 11:11:20 +0200
commit19d339f11d0768df2b4e0c40530bb4ab53e6bb05 (patch)
tree9e8b129b7cef82dfb4725c9152268110777032fb /hw/virtio
parentc8075caf19b000b975349f8976958cedf7d2613a (diff)
virtio-scsi: Add 'iothread' property to virtio-scsi
Similar to this property in virtio-blk for dataplane, add it as a QOM link in virtio-scsi and an alias in virtio-scsi-pci and virtio-scsi-ccw, in order to assign an iothread to the device. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 83a699fc23..bae62c8f66 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1186,6 +1186,8 @@ static void virtio_scsi_pci_instance_init(Object *obj)
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
TYPE_VIRTIO_SCSI);
+ object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev), "iothread",
+ &error_abort);
}
static const TypeInfo virtio_scsi_pci_info = {