[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 5/9] virtio-scsi: Add wwpn and tgpt properties
From: |
Nicholas A. Bellinger |
Subject: |
[Qemu-devel] [RFC 5/9] virtio-scsi: Add wwpn and tgpt properties |
Date: |
Tue, 24 Jul 2012 22:34:02 +0000 |
From: Stefan Hajnoczi <address@hidden>
A vhost-scsi device must be bound to a tcm_vhost target port. This will
be done by issuing an ioctl to the device with the wwpn and tgpt. This
patch adds these properties to the virtio-scsi-pci device:
qemu -device virtio-scsi-pci,wwpn=$TARGET_WWN,tgpt=$TPGT
Future patches will open /dev/vhost-scsi and issue the ioctl.
This patch also moves the virtio_scsi_init() prototype to
hw/virtio-scsi.h where the VirtIOSCSIConf structure is defined. I think
this is cleaner than defining it in hw/virtio.h.
(v2: Use modern VirtIOSCSIConf define in virtio-scsi.h)
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Zhi Yong Wu <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Nicholas Bellinger <address@hidden>
---
hw/virtio-scsi.c | 2 ++
hw/virtio-scsi.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index 0a5ac40..4a787d3 100644
--- a/hw/virtio-scsi.c
+++ b/hw/virtio-scsi.c
@@ -13,6 +13,8 @@
*
*/
+#include "qemu-common.h"
+#include "qemu-error.h"
#include "virtio-scsi.h"
#include <hw/scsi.h>
#include <hw/scsi-defs.h>
diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h
index 4bc889d..74e9422 100644
--- a/hw/virtio-scsi.h
+++ b/hw/virtio-scsi.h
@@ -22,6 +22,7 @@
#define VIRTIO_ID_SCSI 8
struct VirtIOSCSIConf {
+ VHostSCSI *vhost_scsi;
uint32_t num_queues;
uint32_t max_sectors;
uint32_t cmd_per_lun;
--
1.7.2.5
- [Qemu-devel] [RFC 0/9] vhost-scsi: Add support for host virtualized target, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 1/9] notifier: add validity check and notify function, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 2/9] virtio-pci: support host notifiers in TCG mode, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 3/9] virtio-pci: check that event notification worked, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 4/9] vhost: Pass device path to vhost_dev_init(), Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 5/9] virtio-scsi: Add wwpn and tgpt properties,
Nicholas A. Bellinger <=
- [Qemu-devel] [RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 7/9] virtio-scsi: Start/stop vhost, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 8/9] virtio-scsi: Set max_target=0 during vhost-scsi operation, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 9/9] vhost-scsi: add -vhost-scsi host device, Nicholas A. Bellinger, 2012/07/24
- Re: [Qemu-devel] [RFC 0/9] vhost-scsi: Add support for host virtualized target, Zhi Yong Wu, 2012/07/24