qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 09/17] megasas: add MegaRAID SAS 2108 emulation


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 09/17] megasas: add MegaRAID SAS 2108 emulation
Date: Wed, 29 Oct 2014 13:01:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

Hi Hannes,

Am 29.10.2014 um 08:53 schrieb Hannes Reinecke:
> The 2108 chip supports MSI and MSI-X, so update the emulation
> to support both chips.
> 
> Signed-off-by: Hannes Reinecke <address@hidden>
> ---
>  hw/scsi/megasas.c        | 218 
> +++++++++++++++++++++++++++++++++++++++++------
>  hw/scsi/mfi.h            |   7 ++
>  include/hw/pci/pci_ids.h |   1 +
>  3 files changed, 201 insertions(+), 25 deletions(-)
> 
> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> index 1041e3d..00c1d5c 100644
> --- a/hw/scsi/megasas.c
> +++ b/hw/scsi/megasas.c
[...]
> @@ -2151,7 +2212,7 @@ static void megasas_scsi_reset(DeviceState *dev)
>      megasas_soft_reset(s);
>  }
>  
> -static const VMStateDescription vmstate_megasas = {
> +static VMStateDescription vmstate_megasas_gen1 = {

Why are you dropping const? I don't spot a modification.
Same question below; otherwise looks fine.

Regards,
Andreas

>      .name = "megasas",
>      .version_id = 0,
>      .minimum_version_id = 0,
> @@ -2169,6 +2230,25 @@ static const VMStateDescription vmstate_megasas = {
>      }
>  };
>  
> +static VMStateDescription vmstate_megasas_gen2 = {
> +    .name = "megasas-gen2",
> +    .version_id = 0,
> +    .minimum_version_id = 0,
> +    .minimum_version_id_old = 0,
> +    .fields      = (VMStateField[]) {
> +        VMSTATE_PCIE_DEVICE(parent_obj, MegasasState),
> +        VMSTATE_MSIX(parent_obj, MegasasState),
> +
> +        VMSTATE_INT32(fw_state, MegasasState),
> +        VMSTATE_INT32(intr_mask, MegasasState),
> +        VMSTATE_INT32(doorbell, MegasasState),
> +        VMSTATE_UINT64(reply_queue_pa, MegasasState),
> +        VMSTATE_UINT64(consumer_pa, MegasasState),
> +        VMSTATE_UINT64(producer_pa, MegasasState),
> +        VMSTATE_END_OF_LIST()
> +    }
> +};
> +
>  static void megasas_scsi_uninit(PCIDevice *d)
>  {
>      MegasasState *s = MEGASAS(d);
[snip]

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]