From patchwork Thu May 26 10:56:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 97535 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3A7C1B6EDF for ; Thu, 26 May 2011 20:57:24 +1000 (EST) Received: from localhost ([::1]:34552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPYFk-00023Z-It for incoming@patchwork.ozlabs.org; Thu, 26 May 2011 06:57:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPYFQ-000238-LV for qemu-devel@nongnu.org; Thu, 26 May 2011 06:57:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPYFO-0003SX-6Q for qemu-devel@nongnu.org; Thu, 26 May 2011 06:57:00 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:47990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPYFO-0003Ru-0o for qemu-devel@nongnu.org; Thu, 26 May 2011 06:56:58 -0400 Received: by wyb42 with SMTP id 42so463044wyb.4 for ; Thu, 26 May 2011 03:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer; bh=L1UJ14C1oAnYyZDTsmtYZbK/e2fqQ4XXrNhuHhgMopI=; b=QdGLfSzbcrT1u4CkKexx9rniZ/NbVRiNyOO0mimpLK8CkuuFlAIeqMe+CnxxbM8GRn rUfAV9+JMO1MYuAytsjQaitfCypPmml8/DPHkkYEHwXFOv2kUB3Kj+4M50dlLL7nt34Z 1+0PEwCy+IHGhe2CQHKS2K6hgP9S+Qzd2dGqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer; b=EgvdLwLj23akhucmBS4gbOs0CkUwwGYs6raE5dX1MeoRlsNxKDmfHR3VfMqokix6Bi XrAIs49fq3ShWjAwTpo7nQs5mWCWRTgDE65onMJAkMPx2u5qKrGRkkzLUaP1xO6+Plqu Uq3M66YwVkWTGOIZEKTmBQ5OpFj4nvCAKeRQY= Received: by 10.216.69.196 with SMTP id n46mr637562wed.86.1306407417115; Thu, 26 May 2011 03:56:57 -0700 (PDT) Received: from localhost.localdomain (93-34-184-88.ip51.fastwebnet.it [93.34.184.88]) by mx.google.com with ESMTPS id k16sm293060wed.8.2011.05.26.03.56.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 03:56:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 26 May 2011 12:56:26 +0200 Message-Id: <1306407411-4290-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.173 Subject: [Qemu-devel] [PULL v5 00/25] SCSI subsystem improvements X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The following changes since commit aa29141d84d58171c2d219f0a4b599bd76fb2e37: Merge remote-tracking branch 'kraxel/CVE-2011-1751' into staging (2011-05-25 07:04:13 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi.2 This series includes the following improvements to the SCSI subsystem: 1) introduction of SCSIBusOps that generalize the existing command_complete callback; 2) widespread use of the SCSIRequest abstraction, with simpler memory management (refcounting) and with various common idioms converted into simple C functions instead of duplicating them all over the place; 3) support for autosense. Some patches are from Hannes Reinecke's megasas patchset posted last November, forward ported and applied to the new vSCSI controller as well. Most have been acked by Christoph; I fixed all issues he pointed out in the others. I already planned the following two series too: 1) adding support for zerocopy. Previous attempts were rejected because they were applied to real devices (thus making for example an IOMMU hard to impossible). However, for PV devices zerocopy should be uncontroversial---and it is a must to get competitive performance WRT virtio-blk. I'll use vmw-pvscsi for the first implementation and for benchmarking. 2) adding support for multiple LUNs; see recently posted RFC for this. After this I'll work on the virtio-scsi device model. Testing: - RHEL6.1 install complete to scsi-disk with lsi, from scsi-generic CD - iozone run with lsi on scsi-disk target - RHEL6.1 install to usb-msd from IDE CD is too slow, but it manages to format /boot in ~10 minutes with or without the patches - RHEL6.1 install with vscsi with scsi-disk CD and installation disk hung at the same place with or without the series, perhaps it was just me being impatient. esp is only compile tested. Please review and merge. v4->v5: SCSIBusOps now const-ified. Added braces here and there. Added patch 5. v3->v4: renamed scsi_req_kick to scsi_req_continue. Changed SCSIBusOps to pointer. Removed scsi_req_free, merged it into scsi_req_unref. Added head comments for some functions. Renamed arguments to HBA callbacks. Added patches 23 and 24 v2->v3: included fixes for Jonathan Nieder's recently reported bug v1->v2: rebased, added patch 21 Hannes Reinecke (4): scsi: Use 'SCSIRequest' directly scsi: Update sense code handling scsi: Implement 'get_sense' callback scsi-disk: add data direction checking Paolo Bonzini (21): scsi: add tracing of scsi requests scsi-generic: Remove bogus double complete scsi: introduce scsi_req_data scsi: introduce SCSIBusOps scsi-generic: do not use a stale aiocb scsi: reference-count requests lsi: extract lsi_find_by_tag scsi: commonize purging requests scsi: introduce scsi_req_abort scsi: introduce scsi_req_cancel scsi: use scsi_req_complete scsi: do not call send_command directly scsi: introduce scsi_req_new scsi: introduce scsi_req_continue scsi: introduce scsi_req_get_buf scsi: make write_data return void scsi-generic: Handle queue full esp: rename sense to status scsi: split command_complete callback in two scsi: rename arguments to the new callbacks scsi: ignore LUN field in the CDB hw/esp.c | 119 ++++++++++++++---------- hw/lsi53c895a.c | 200 ++++++++++++++++++++++++--------------- hw/scsi-bus.c | 220 +++++++++++++++++++++++++++++++++++++++---- hw/scsi-disk.c | 271 ++++++++++++++++++++++------------------------------- hw/scsi-generic.c | 223 +++++++++++++++++++++----------------------- hw/scsi.h | 91 ++++++++++++++---- hw/spapr_vscsi.c | 187 ++++++++++++++++++++---------------- hw/usb-msd.c | 120 ++++++++++++++---------- trace-events | 8 ++ 9 files changed, 866 insertions(+), 573 deletions(-)