From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGjH4-0004HZ-62 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 02:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGjH0-0007xV-V1 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 02:12:22 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:44683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGjH0-0007U1-C2 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 02:12:18 -0500 From: Date: Thu, 29 Jan 2015 15:08:55 +0800 Message-ID: <1422515335-13316-6-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1422515335-13316-1-git-send-email-arei.gonglei@huawei.com> References: <1422515335-13316-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: weidong.huang@huawei.com, subo7@huawei.com, mst@redhat.com, peter.huangpeng@huawei.com, Gonglei , pbonzini@redhat.com From: Gonglei 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 Signed-off-by: Bo Su --- 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