From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNQFU-000155-O1 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 13:18:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNQFP-0001Ll-BA for qemu-devel@nongnu.org; Mon, 16 Feb 2015 13:18:24 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:47970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNQFP-0001LZ-2p for qemu-devel@nongnu.org; Mon, 16 Feb 2015 13:18:19 -0500 Received: by mail-we0-f171.google.com with SMTP id p10so30749383wes.2 for ; Mon, 16 Feb 2015 10:18:18 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 16 Feb 2015 19:17:46 +0100 Message-Id: <1424110682-14334-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1424110682-14334-1-git-send-email-pbonzini@redhat.com> References: <1424110682-14334-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 05/21] vhost-scsi: add a property for booting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei From: Gonglei Because Qemu only accept an wwpn argument for vhost-scsi, we cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu doesn't know which tpg can boot, but vhost-scsi driver module doesn't know too for one assigned wwpn. At present, we assume that the first tpg can boot only, and add a boot_tpgt property that defaults to 0. Of course, people can pass a valid value by qemu command line. Suggested-by: Paolo Bonzini Signed-off-by: Gonglei Acked-by: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- include/hw/virtio/vhost-scsi.h | 1 + include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h index c0056c2..dea0075 100644 --- a/include/hw/virtio/vhost-scsi.h +++ b/include/hw/virtio/vhost-scsi.h @@ -69,6 +69,7 @@ typedef struct VHostSCSI { #define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \ DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \ DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \ + DEFINE_PROP_UINT32("boot_tpgt", _state, _conf_field.boot_tpgt, 0), \ DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \ DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \ DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128) diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index bf17cc9..c122e7a 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -153,6 +153,7 @@ struct VirtIOSCSIConf { uint32_t cmd_per_lun; char *vhostfd; char *wwpn; + uint32_t boot_tpgt; IOThread *iothread; }; -- 2.3.0