]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vhost-scsi: set the bootable value of channel/target/lun
authorGonglei <arei.gonglei@huawei.com>
Thu, 29 Jan 2015 07:08:55 +0000 (15:08 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Feb 2015 20:47:52 +0000 (21:47 +0100)
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>
hw/scsi/vhost-scsi.c

index dc9076ead9f3963efbdd82e3f30d3bb788f9287b..e30ff84c0c916b225de5fe1a3128126f3474d4c1 100644 (file)
@@ -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);