From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8MW4-0006uw-Nm for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:21:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8MW1-0006PA-I2 for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:21:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8MW1-0006OA-CM for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:21:45 -0500 References: <1449921644-31673-1-git-send-email-shmulik.ladkani@ravellosystems.com> <1449921644-31673-4-git-send-email-shmulik.ladkani@ravellosystems.com> From: Jason Wang Message-ID: <566E5FF3.1050404@redhat.com> Date: Mon, 14 Dec 2015 14:21:39 +0800 MIME-Version: 1.0 In-Reply-To: <1449921644-31673-4-git-send-email-shmulik.ladkani@ravellosystems.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/7] vmxnet3: Introduce 'x-old-msi-offsets' backword compatability property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shmulik Ladkani , Dmitry Fleytman Cc: idan.brown@ravellosystems.com, qemu-devel@nongnu.org On 12/12/2015 08:00 PM, Shmulik Ladkani wrote: > Following the previous patches, where vmxnet3's pci's msi/msix > capability offsets and msix's PBA table offsets have been changed, this > patch introduces a boolean property 'x-old-msi-offsets' to vmxnet3, > whose default is false. > > Setting 'x-old-msi-offsets' to 'on' preserves the old offsets behavior, > which allows migration to older versions. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 2 ++ > include/hw/compat.h | 4 ++++ > 2 files changed, 6 insertions(+) > > diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c > index 97f0aea..d1fe888 100644 > --- a/hw/net/vmxnet3.c > +++ b/hw/net/vmxnet3.c > @@ -2564,6 +2564,8 @@ static const VMStateDescription vmstate_vmxnet3 = { > > static Property vmxnet3_properties[] = { > DEFINE_NIC_PROPERTIES(VMXNET3State, conf), > + DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags, > + VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false), > DEFINE_PROP_END_OF_LIST(), > }; > > diff --git a/include/hw/compat.h b/include/hw/compat.h > index d0b1c4f..01e326d 100644 > --- a/include/hw/compat.h > +++ b/include/hw/compat.h > @@ -18,6 +18,10 @@ > .driver = "virtio-pci",\ > .property = "migrate-extra",\ > .value = "off",\ > + },{\ > + .driver = "vmxnet3",\ > + .property = "x-old-msi-offsets",\ > + .value = "on",\ > }, > > #define HW_COMPAT_2_3 \ Too late for 2.5. Need to do this for 2.6, so we probably want either introduce 2.6 machine type by yourself or wait for somebody else to do it and do it for HW_COMPAT_2_5 :)