From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmIWA-0005SW-08 for qemu-devel@nongnu.org; Wed, 04 Jul 2012 01:52:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmIW7-0001hZ-UZ for qemu-devel@nongnu.org; Wed, 04 Jul 2012 01:52:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34135 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmIW7-0001hJ-LF for qemu-devel@nongnu.org; Wed, 04 Jul 2012 01:52:47 -0400 Message-ID: <4FF3DA29.1080003@suse.de> Date: Wed, 04 Jul 2012 07:52:41 +0200 From: Hannes Reinecke MIME-Version: 1.0 References: <1341222087-24920-1-git-send-email-pbonzini@redhat.com> <1341222087-24920-9-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 08/14] megasas: LSI Megaraid SAS HBA emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , qemu-devel@nongnu.org On 07/03/2012 09:09 PM, Blue Swirl wrote: > On Mon, Jul 2, 2012 at 9:41 AM, Paolo Bonzini wro= te: >> From: Hannes Reinecke >> >> This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. >> I've tested it to work with Linux, Windows Vista, and Windows7. >> >> Signed-off-by: Hannes Reinecke >> [ Squashed tracing patch (no need to keep it separate) and trivial cha= nges >> from Andreas Faerber. Rebased over IOMMU and QBus changes. - Paolo = ] >> Signed-off-by: Paolo Bonzini >> --- >> default-configs/pci.mak | 1 + >> hw/Makefile.objs | 1 + >> hw/megasas.c | 2198 ++++++++++++++++++++++++++++++++++++++= +++++++++ >> hw/pci_ids.h | 2 + >> trace-events | 79 ++ >> 5 files changed, 2281 insertions(+) >> create mode 100644 hw/megasas.c >> >> diff --git a/default-configs/pci.mak b/default-configs/pci.mak >> index 9d3e1db..4b49c00 100644 >> --- a/default-configs/pci.mak >> +++ b/default-configs/pci.mak >> @@ -10,6 +10,7 @@ CONFIG_EEPRO100_PCI=3Dy >> CONFIG_PCNET_PCI=3Dy >> CONFIG_PCNET_COMMON=3Dy >> CONFIG_LSI_SCSI_PCI=3Dy >> +CONFIG_MEGASAS_SCSI_PCI=3Dy >> CONFIG_RTL8139_PCI=3Dy >> CONFIG_E1000_PCI=3Dy >> CONFIG_IDE_CORE=3Dy >> diff --git a/hw/Makefile.objs b/hw/Makefile.objs >> index 3d77259..9a350de 100644 >> --- a/hw/Makefile.objs >> +++ b/hw/Makefile.objs >> @@ -86,6 +86,7 @@ hw-obj-$(CONFIG_OPENCORES_ETH) +=3D opencores_eth.o >> >> # SCSI layer >> hw-obj-$(CONFIG_LSI_SCSI_PCI) +=3D lsi53c895a.o >> +hw-obj-$(CONFIG_MEGASAS_SCSI_PCI) +=3D megasas.o >> hw-obj-$(CONFIG_ESP) +=3D esp.o >> >> hw-obj-y +=3D sysbus.o isa-bus.o >> diff --git a/hw/megasas.c b/hw/megasas.c >> new file mode 100644 >> index 0000000..b48836f >> --- /dev/null >> +++ b/hw/megasas.c >> @@ -0,0 +1,2198 @@ >> +/* >> + * QEMU MegaRAID SAS 8708EM2 Host Bus Adapter emulation >> + * Based on the linux driver code at drivers/scsi/megaraid >> + * >> + * Copyright (c) 2009-2012 Hannes Reinecke, SUSE Labs >> + * >> + * This library is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU Lesser General Public >> + * License as published by the Free Software Foundation; either >> + * version 2 of the License, or (at your option) any later version. >> + * >> + * This library is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> + * Lesser General Public License for more details. >> + * >> + * You should have received a copy of the GNU Lesser General Public >> + * License along with this library; if not, see . >> + */ >> + >> +#include "hw.h" >> +#include "pci.h" >> +#include "dma.h" >> +#include "msix.h" >> +#include "iov.h" >> +#include "scsi.h" >> +#include "scsi-defs.h" >> +#include "block_int.h" >> +#include "trace.h" >> + >> +#include "mfi.h" >=20 > A pointer to chip set docs would be nice. >=20 Oh, do you have some? I would _love_ to add it, what with me having developed this thing without it ... No, seriously: I haven't managed to get any documentation for this beast. LSI hasn't been exactly forthcoming with help here. [ .. ] >> + >> +const char *mfi_frame_desc[] =3D { >=20 > Missing 'static'. >=20 If you insist ... [ .. ] Hey, cool. Just one issue. Paolo, can you fix it up in your tree or should I re-send the patch? Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg GF: J. Hawn, J. Guild, F. Imend=C3=B6rffer, HRB 16746 (AG N=C3=BCrnberg)