[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/16] megasas: LSI Megaraid SAS emulation
From: |
Hannes Reinecke |
Subject: |
Re: [Qemu-devel] [PATCH 16/16] megasas: LSI Megaraid SAS emulation |
Date: |
Fri, 19 Nov 2010 15:19:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Thunderbird/3.0.10 |
On 11/19/2010 03:06 PM, Markus Armbruster wrote:
> Jes Sorensen <address@hidden> writes:
>
>> 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 <address@hidden>
>>> ---
>>> 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) += ide/macio.o
>>> hw-obj-$(CONFIG_IDE_VIA) += ide/via.o
>>>
>>> # SCSI layer
>>> -hw-obj-y += lsi53c895a.o
>>> +hw-obj-y += lsi53c895a.o megasas.o
>>> hw-obj-$(CONFIG_ESP) += esp.o
>>>
>>> hw-obj-y += 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 to
>> make the driver selection configurable, rather than hard coding the build?
>
> What do you mean by that?
>
> We hardcode lsi53c895a in two places where we really mean "default SCSI
> controller type": pc_pci_device_init(), which applies to "-drive
> if=scsi", and qemu_pci_hot_add_storage(), which applies to "pci_add
> storage if=scsi". Not sure making that default configurable is worth
> it.
>
> 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=megasas' or somesuch.
But then, you can 'easily' select the megasas HBA nowadays with
-drive file=XXX,if=none,id=d1 \
-device megasas,id=m1 \
-device scsi-disk,drive=d1
So not sure if it's worthwhile.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
address@hidden +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)