From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nicholas A. Bellinger" Subject: [PATCH 0/5] *** SUBJECT HERE *** Date: Mon, 14 Jun 2010 02:44:04 -0700 Message-ID: <1276508644-3005-1-git-send-email-nab@linux-iscsi.org> Cc: Hannes Reinecke , Paul Brook , Christoph Hellwig , kvm-devel , qemu-devel , Nicholas Bellinger To: Gerd Hoffmann , Kevin Wolf , FUJITA Tomonori Return-path: Received: from smtp108.sbc.mail.gq1.yahoo.com ([67.195.14.111]:30449 "HELO smtp108.sbc.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755629Ab0FNJno (ORCPT ); Mon, 14 Jun 2010 05:43:44 -0400 Sender: kvm-owner@vger.kernel.org List-ID: From: Nicholas Bellinger 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, Signed-off-by: Nicholas A. Bellinger 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38303 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OO6Kk-0008RM-Sl for qemu-devel@nongnu.org; Mon, 14 Jun 2010 05:52:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OO6Cn-0007eV-Tk for qemu-devel@nongnu.org; Mon, 14 Jun 2010 05:43:51 -0400 Received: from smtp108.sbc.mail.gq1.yahoo.com ([67.195.14.111]:30451) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OO6Cn-0007eF-NC for qemu-devel@nongnu.org; Mon, 14 Jun 2010 05:43:45 -0400 From: "Nicholas A. Bellinger" Date: Mon, 14 Jun 2010 02:44:04 -0700 Message-Id: <1276508644-3005-1-git-send-email-nab@linux-iscsi.org> Subject: [Qemu-devel] [PATCH 0/5] *** SUBJECT HERE *** List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , Kevin Wolf , FUJITA Tomonori Cc: kvm-devel , qemu-devel , Nicholas Bellinger , Hannes Reinecke , Christoph Hellwig , Paul Brook From: Nicholas Bellinger 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, Signed-off-by: Nicholas A. Bellinger 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