qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channe


From: arei.gonglei
Subject: [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun
Date: Thu, 29 Jan 2015 15:08:55 +0800

From: Gonglei <address@hidden>

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 <address@hidden>
Signed-off-by: Bo Su <address@hidden>
---
 hw/scsi/vhost-scsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

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);
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]