From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjRx3-00035k-6m for qemu-devel@nongnu.org; Wed, 29 Oct 2014 08:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjRwv-0008Jm-1n for qemu-devel@nongnu.org; Wed, 29 Oct 2014 08:02:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34347 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjRwu-0008G7-Ra for qemu-devel@nongnu.org; Wed, 29 Oct 2014 08:02:00 -0400 Message-ID: <5450D735.7080409@suse.de> Date: Wed, 29 Oct 2014 13:01:57 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1414569232-21357-1-git-send-email-hare@suse.de> <1414569232-21357-10-git-send-email-hare@suse.de> In-Reply-To: <1414569232-21357-10-git-send-email-hare@suse.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 09/17] megasas: add MegaRAID SAS 2108 emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke , qemu-devel@nongnu.org Cc: Paolo Bonzini , Alexander Graf , Nic Bellinger 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. >=20 > Signed-off-by: Hannes Reinecke > --- > hw/scsi/megasas.c | 218 +++++++++++++++++++++++++++++++++++++++= ++------ > hw/scsi/mfi.h | 7 ++ > include/hw/pci/pci_ids.h | 1 + > 3 files changed, 201 insertions(+), 25 deletions(-) >=20 > 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); > } > =20 > -static const VMStateDescription vmstate_megasas =3D { > +static VMStateDescription vmstate_megasas_gen1 =3D { Why are you dropping const? I don't spot a modification. Same question below; otherwise looks fine. Regards, Andreas > .name =3D "megasas", > .version_id =3D 0, > .minimum_version_id =3D 0, > @@ -2169,6 +2230,25 @@ static const VMStateDescription vmstate_megasas = =3D { > } > }; > =20 > +static VMStateDescription vmstate_megasas_gen2 =3D { > + .name =3D "megasas-gen2", > + .version_id =3D 0, > + .minimum_version_id =3D 0, > + .minimum_version_id_old =3D 0, > + .fields =3D (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 =3D MEGASAS(d); [snip] --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg