From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54763 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJRlq-0007Ow-8t for qemu-devel@nongnu.org; Fri, 19 Nov 2010 09:16:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJRlp-0002v1-2m for qemu-devel@nongnu.org; Fri, 19 Nov 2010 09:16:58 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55252 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJRlo-0002uf-Li for qemu-devel@nongnu.org; Fri, 19 Nov 2010 09:16:57 -0500 Message-ID: <4CE6876B.9010001@suse.de> Date: Fri, 19 Nov 2010 15:19:23 +0100 From: Hannes Reinecke MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 16/16] megasas: LSI Megaraid SAS emulation References: <20101118144755.442B2F90AB@ochil.suse.de> <4CE64151.7050601@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Jes Sorensen , kraxel@redhat.com, qemu-devel@nongnu.org, nab@linux-iscsi.org, stefanha@gmail.com On 11/19/2010 03:06 PM, Markus Armbruster wrote: > Jes Sorensen writes: >=20 >> On 11/18/10 15:47, Hannes Reinecke wrote: >>> This patch adds an emulation for the LSI Megaraid SAS HBA. >>> >>> Signed-off-by: Hannes Reinecke >>> --- >>> Makefile.objs | 2 +- >>> hw/megasas.c | 1826 +++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++ >>> hw/mfi.h | 1197 +++++++++++++++++++++++++++++++++++++ >>> hw/pci_ids.h | 2 + >>> hw/scsi.h | 1 + >>> 5 files changed, 3027 insertions(+), 1 deletions(-) >>> create mode 100644 hw/megasas.c >>> create mode 100644 hw/mfi.h >>> >>> diff --git a/Makefile.objs b/Makefile.objs >>> index 15569af..54c6e02 100644 >>> --- a/Makefile.objs >>> +++ b/Makefile.objs >>> @@ -231,7 +231,7 @@ hw-obj-$(CONFIG_IDE_MACIO) +=3D ide/macio.o >>> hw-obj-$(CONFIG_IDE_VIA) +=3D ide/via.o >>> =20 >>> # SCSI layer >>> -hw-obj-y +=3D lsi53c895a.o >>> +hw-obj-y +=3D lsi53c895a.o megasas.o >>> hw-obj-$(CONFIG_ESP) +=3D esp.o >>> =20 >>> hw-obj-y +=3D dma-helpers.o sysbus.o isa-bus.o >> >> Just had a look through your patches and have to say nice work. Haven'= t >> tested it though, but looks like a good step in the right direction. >> >> Only comment, as you are adding another SCSI driver, maybe it's time t= o >> make the driver selection configurable, rather than hard coding the bu= ild? >=20 > What do you mean by that? >=20 > We hardcode lsi53c895a in two places where we really mean "default SCSI > controller type": pc_pci_device_init(), which applies to "-drive > if=3Dscsi", and qemu_pci_hot_add_storage(), which applies to "pci_add > storage if=3Dscsi". Not sure making that default configurable is worth > it. >=20 > If you want more control than -drive and pci_add provice, use -device > and device_add. Idea is probably to have megasas the default SCSI controller, if configured during compile time. Basically have a configure option '--scsi-hba=3Dmegasas' or somesuch. But then, you can 'easily' select the megasas HBA nowadays with -drive file=3DXXX,if=3Dnone,id=3Dd1 \ -device megasas,id=3Dm1 \ -device scsi-disk,drive=3Dd1 So not sure if it's worthwhile. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: Markus Rex, HRB 16746 (AG N=FCrnberg)