[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/14] megasas: LSI Megaraid SAS HBA emulation
From: |
Hannes Reinecke |
Subject: |
Re: [Qemu-devel] [PATCH 08/14] megasas: LSI Megaraid SAS HBA emulation |
Date: |
Wed, 04 Jul 2012 07:52:41 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
On 07/03/2012 09:09 PM, Blue Swirl wrote:
> On Mon, Jul 2, 2012 at 9:41 AM, Paolo Bonzini <address@hidden> wrote:
>> From: Hannes Reinecke <address@hidden>
>>
>> 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 <address@hidden>
>> [ Squashed tracing patch (no need to keep it separate) and trivial changes
>> from Andreas Faerber. Rebased over IOMMU and QBus changes. - Paolo ]
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>> 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=y
>> CONFIG_PCNET_PCI=y
>> CONFIG_PCNET_COMMON=y
>> CONFIG_LSI_SCSI_PCI=y
>> +CONFIG_MEGASAS_SCSI_PCI=y
>> CONFIG_RTL8139_PCI=y
>> CONFIG_E1000_PCI=y
>> CONFIG_IDE_CORE=y
>> 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) += opencores_eth.o
>>
>> # SCSI layer
>> hw-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
>> +hw-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
>> hw-obj-$(CONFIG_ESP) += esp.o
>>
>> hw-obj-y += 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
>> <http://www.gnu.org/licenses/>.
>> + */
>> +
>> +#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"
>
> A pointer to chip set docs would be nice.
>
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[] = {
>
> Missing 'static'.
>
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
--
Dr. Hannes Reinecke zSeries & Storage
address@hidden +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
- [Qemu-devel] [PATCH 07/14] megasas: Add header file, (continued)
- [Qemu-devel] [PATCH 07/14] megasas: Add header file, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 06/14] ISCSI: force use of sg for SMC and SSC devices, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 13/14] scsi: Add basic support for SCSI media changer commands., Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 10/14] scsi: Fix data length == SCSI_SENSE_BUF_SIZE, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 11/14] scsi: Fix LOAD_UNLOAD, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 12/14] scsi: Ensure command and transfer lengths are set for all SCSI devices, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 09/14] virtio-scsi: do not crash on adding buffers to the event queue, Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 14/14] scsi: Fix transfer length for READ POSITION commands., Paolo Bonzini, 2012/07/02
- [Qemu-devel] [PATCH 08/14] megasas: LSI Megaraid SAS HBA emulation, Paolo Bonzini, 2012/07/02
Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Anthony Liguori, 2012/07/09
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Alexander Graf, 2012/07/09
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Anthony Liguori, 2012/07/09
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Hannes Reinecke, 2012/07/10
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Paolo Bonzini, 2012/07/10
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Anthony Liguori, 2012/07/10
- Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02, Hannes Reinecke, 2012/07/10