From 5e9be92d775208cf6cc9bf9a592853888046239e Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Fri, 29 Mar 2013 01:08:16 +0000 Subject: vhost-scsi: new device supporting the tcm_vhost Linux kernel module The WWPN specified in configfs is passed to "-device vhost-scsi-pci". The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not available from the QEMU command-line. Instead, I hardcode it to zero. Changes in Patch-v2: - Add vhost_scsi_get_features() in order to determine feature bits supports by host kernel (mst + nab) - Re-enable usage of DEFINE_VIRTIO_COMMON_FEATURES, and allow EVENT_IDX to be disabled by host in vhost_scsi_get_features() - Drop unused hotplug bit in DEFINE_VHOST_SCSI_PROPERTIES Changes in Patch-v1: - Set event_idx=off by default (nab, thanks asias) - Disable hotplug feature bit for v3.9 tcm_vhost kernel code, need to re-enable in v3.10 (nab) - Update to latest qemu.git/master HEAD Changes in WIP-V3: - Drop ioeventfd vhost_scsi_properties (asias, thanks stefanha) - Add CONFIG_VHOST_SCSI (asias, thanks stefanha) - Add hotplug feature bit Changes in WIP-V2: - Add backend guest masking support (nab) - Bump ABI_VERSION to 1 (nab) - Set up set_guest_notifiers (asias) - Set up vs->dev.vq_index (asias) - Drop vs->vs.vdev.{set,clear}_vhost_endpoint (asias) - Drop VIRTIO_CONFIG_S_DRIVER check in vhost_scsi_set_status (asias) Howto: Use the latest seabios, at least commit b44a7be17b git clone git://git.seabios.org/seabios.git make cp out/bios.bin /usr/share/qemu/bios.bin qemu -device vhost-scsi-pci,wwpn=naa.6001405bd4e8476d,event_idx=off ... Cc: Michael S. Tsirkin Signed-off-by: Nicholas Bellinger Signed-off-by: Asias He [ Rebase on top of VirtIOSCSICommon patch, fix bugs in feature negotiation and irqfd masking - Paolo ] Signed-off-by: Paolo Bonzini --- hw/scsi/Makefile.objs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hw/scsi/Makefile.objs') diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs index eaec6c87ef..121ddc5cf4 100644 --- a/hw/scsi/Makefile.objs +++ b/hw/scsi/Makefile.objs @@ -6,4 +6,8 @@ common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o common-obj-$(CONFIG_ESP) += esp.o common-obj-$(CONFIG_ESP_PCI) += esp-pci.o obj-$(CONFIG_PSERIES) += spapr_vscsi.o -obj-$(CONFIG_VIRTIO) += virtio-scsi.o + +ifeq ($(CONFIG_VIRTIO),y) +obj-y += virtio-scsi.o +obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o +endif -- cgit v1.2.3