aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/vhost-scsi.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2015-01-29 15:08:55 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2015-02-11 21:47:52 +0100
commit444c7e0d92b5eb35fb85dc654f4bd991b0d3a0f2 (patch)
tree3dfa1d792da38574260775497ac95bcbf06ccce3 /hw/scsi/vhost-scsi.c
parent9143d5f0f14c1eef92a362b3b976606ad2874daa (diff)
downloadqemu-444c7e0d92b5eb35fb85dc654f4bd991b0d3a0f2.zip
qemu-444c7e0d92b5eb35fb85dc654f4bd991b0d3a0f2.tar.gz
qemu-444c7e0d92b5eb35fb85dc654f4bd991b0d3a0f2.tar.bz2
vhost-scsi: set the bootable value of channel/target/lun
At present, the target is valued boot_tpgt, In addition, channel and lun both are 0 for bootable vhost-scsi device. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Bo Su <subo7@huawei.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/vhost-scsi.c')
-rw-r--r--hw/scsi/vhost-scsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index dc9076e..e30ff84 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -251,6 +251,12 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
return;
}
+ /* At present, channel and lun both are 0 for bootable vhost-scsi disk */
+ s->channel = 0;
+ s->lun = 0;
+ /* Note: we can also get the minimum tpgt from kernel */
+ s->target = vs->conf.boot_tpgt;
+
error_setg(&s->migration_blocker,
"vhost-scsi does not support migration");
migrate_add_blocker(s->migration_blocker);