[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/16] virtio-scsi: Add wwpn and tgpt properties
From: |
zwu . kernel |
Subject: |
[Qemu-devel] [PATCH 01/16] virtio-scsi: Add wwpn and tgpt properties |
Date: |
Thu, 19 Apr 2012 10:38:54 +0800 |
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.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Zhi Yong Wu <address@hidden>
---
hw/virtio-scsi.c | 2 ++
hw/virtio-scsi.h | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index 45d54fa..ff5d351 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..895f620 100644
--- a/hw/virtio-scsi.h
+++ b/hw/virtio-scsi.h
@@ -33,4 +33,10 @@ struct VirtIOSCSIConf {
DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors,
0xFFFF), \
DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
+typedef struct {
+ /* The tcm_vhost wwpn and tgpt */
+ char *wwpn;
+ char *tgpt;
+} VirtIOSCSIConf;
+
#endif /* _QEMU_VIRTIO_SCSI_H */
--
1.7.6
- [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 02/16] vhost: Pass device path to vhost_dev_init(), zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 05/16] virtio-scsi: Build virtio-scsi.o against vhost.o, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 04/16] virtio-scsi: Fix tgpt typo to tpgt and use uint16_t, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 07/16] virtio-scsi: Start/stop vhost, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 03/16] virtio-scsi: Add vhost_vring_target ioctl struct, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 06/16] virtio-scsi: Open and initialize /dev/vhost-scsi, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 01/16] virtio-scsi: Add wwpn and tgpt properties,
zwu . kernel <=
- [Qemu-devel] [PATCH 13/16] virtio-scsi: WIP VHOST_SCSI_SET_ENDPOINT call, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 12/16] virtio-scsi: use the vhost-scsi host device, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 14/16] vhost-scsi: enable vhost notifiers for multiple queues, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 09/16] virtio-pci: support host notifiers in TCG mode, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 11/16] vhost-scsi: add -vhost-scsi host device, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 08/16] notifier: add validity check and notify function, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 15/16] vhost-scsi: move some definitions to its header file, zwu . kernel, 2012/04/18
- [Qemu-devel] [PATCH 10/16] virtio-pci: check that event notification worked, zwu . kernel, 2012/04/18