From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zguji-0005H8-ER for qemu-devel@nongnu.org; Tue, 29 Sep 2015 09:14:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zguje-0002ql-9D for qemu-devel@nongnu.org; Tue, 29 Sep 2015 09:14:26 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:50426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zguje-0002qb-1J for qemu-devel@nongnu.org; Tue, 29 Sep 2015 09:14:22 -0400 References: <1443094669-4144-1-git-send-email-marcandre.lureau@redhat.com> <1443094669-4144-3-git-send-email-marcandre.lureau@redhat.com> From: Claudio Fontana Message-ID: <560A8EA8.7010407@huawei.com> Date: Tue, 29 Sep 2015 15:14:16 +0200 MIME-Version: 1.0 In-Reply-To: <1443094669-4144-3-git-send-email-marcandre.lureau@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 02/47] msix: add VMSTATE_MSIX_TEST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: pbonzini@redhat.com, drjones@redhat.com, cam@cs.ualberta.ca, stefanha@redhat.com On 24.09.2015 13:37, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > ivshmem is going to use MSIX state conditionally. > > Signed-off-by: Marc-André Lureau > --- > include/hw/pci/msix.h | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h > index 954d82b..72e5f93 100644 > --- a/include/hw/pci/msix.h > +++ b/include/hw/pci/msix.h > @@ -46,12 +46,16 @@ void msix_unset_vector_notifiers(PCIDevice *dev); > > extern const VMStateDescription vmstate_msix; > > -#define VMSTATE_MSIX(_field, _state) { \ > - .name = (stringify(_field)), \ > - .size = sizeof(PCIDevice), \ > - .vmsd = &vmstate_msix, \ > - .flags = VMS_STRUCT, \ > - .offset = vmstate_offset_value(_state, _field, PCIDevice), \ > +#define VMSTATE_MSIX_TEST(_field, _state, _test) { \ > + .name = (stringify(_field)), \ > + .size = sizeof(PCIDevice), \ > + .vmsd = &vmstate_msix, \ > + .flags = VMS_STRUCT, \ > + .offset = vmstate_offset_value(_state, _field, PCIDevice), \ > + .field_exists = (_test) \ > } > > +#define VMSTATE_MSIX(_f, _s) \ > + VMSTATE_MSIX_TEST(_f, _s, NULL) > + > #endif > Reviewed-by: Claudio Fontana