Skip to content

*** SUBJECT HERE ***

Nicholas A. Bellinger kvm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5: Add top level BSG supportblock.c block.h block/raw-posix.c +1 more+41 -50 replies
2/5: Add BSG qemu_open() in block/raw.c:raw_open()block/raw.c+20 -00 replies
3/5: Add paio_submit_len() non sector sized AIOblock/raw-posix-aio.h posix-aio-compat.c+31 -02 replies
4/5: Add BSG support for scsi-bus and scsi-diskhw/scsi-bus.c hw/scsi-disk.c+6 -10 replies
5/5: Add initial support for BSG based SCSIDeviceInfoMakefile.objs hw/scsi-bsg.c+589 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] [QEMU-KVM]: Add BSG backstore using struct sg_io_v4

From: Nicholas Bellinger <[email protected]>

Quick resend with project subject for cover letter..

Greetings Gerd, Hannes and co,

This series adds initial support for a hw/scsi-bsg.c backstore for scsi-bus compatible HBA emulation in QEMU-KVM on Linux hosts supporting the BSG driver. This code is available from the scsi-bsg branch in the megasas/scsi friendly QEMU-KVM tree at:

http://git.kernel.org/?p=virt/kvm/nab/qemu-kvm.git;a=shortlog;h=refs/heads/scsi-bsg

Note that this initial code is being posted for review and to see how useful a BSG backstore would be for QEMU-KVM and Linux hosts. Note that in order for BSG I/O to function using vectored AIO a kernel patch to linux/block/bsg.c:bsg_map_hdr() is currently required running on a bit paired user/kernel enviroment. The kernel patch in question is here:

http://marc.info/?l=linux-scsi&m=127649585524598&w=2

The first three patches involve updating block code to support the BSG backstore for scsi-bsg.

The forth patch adds the minor changes to hw/scsi-bus.c and hw/scsi-disk.c in order to function with scsi-bsg.

And the fifth patch adds the main hw/scsi-bsg.c logic necessary to run the new struct SCSIDeviceInfo and for BSG AIO using struct iovec and paio_submit_len() to function.

So far this patch series has been tested with a Linux based x86_64 KVM host and guest using the hw/megasas.c 8708EM2 HBA Emulation with TCM_Loop virtual SAS Port LUNs.

Comments are welcome,

Nicholas Bellinger (5):
[block]: Add top level BSG support
[block]: Add BSG qemu_open() in block/raw.c:raw_open() [block]: Add paio_submit_len() non sector sized AIO [scsi]: Add BSG support for scsi-bus and scsi-disk [scsi-bsg]: Add initial support for BSG based SCSIDeviceInfo

 Makefile.objs         |    2 +-
 block.c               |   23 ++-
 block.h               |    1 +
 block/raw-posix-aio.h |    3 +
 block/raw-posix.c     |   17 ++-
 block/raw.c           |   20 ++
 block_int.h           |    5 +
 hw/scsi-bsg.c         |  588 +++++++++++++++++++++++++++++++++++++++++++++++++
 hw/scsi-bus.c         |    3 +-
 hw/scsi-disk.c        |    4 +
 posix-aio-compat.c    |   28 +++
 11 files changed, 687 insertions(+), 7 deletions(-)
 create mode 100644 hw/scsi-bsg.c