From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Mav-0001cV-BO for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8Mas-0007WU-67 for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:26:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Mas-0007WI-0p for qemu-devel@nongnu.org; Mon, 14 Dec 2015 01:26:46 -0500 References: <1449921644-31673-1-git-send-email-shmulik.ladkani@ravellosystems.com> <1449921644-31673-7-git-send-email-shmulik.ladkani@ravellosystems.com> From: Jason Wang Message-ID: <566E6121.2050900@redhat.com> Date: Mon, 14 Dec 2015 14:26:41 +0800 MIME-Version: 1.0 In-Reply-To: <1449921644-31673-7-git-send-email-shmulik.ladkani@ravellosystems.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 6/7] vmxnet3: Introduce 'x-disable-pcie' 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 patch which changed vmxnet3 to be a pci express > device, this patch introduces a boolean property 'x-disable-pcie' whose > default is false. > > Setting 'x-disable-pcie' to 'on' preserves the old 'pci device' (non > express) behavior. This 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 7ded287..f9cd02b 100644 > --- a/hw/net/vmxnet3.c > +++ b/hw/net/vmxnet3.c > @@ -2610,6 +2610,8 @@ 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_BIT("x-disable-pcie", VMXNET3State, compat_flags, > + VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), > DEFINE_PROP_END_OF_LIST(), > }; > > diff --git a/include/hw/compat.h b/include/hw/compat.h > index 01e326d..642b082 100644 > --- a/include/hw/compat.h > +++ b/include/hw/compat.h > @@ -22,6 +22,10 @@ > .driver = "vmxnet3",\ > .property = "x-old-msi-offsets",\ > .value = "on",\ > + },{\ > + .driver = "vmxnet3",\ > + .property = "x-disable-pcie",\ > + .value = "on",\ > }, > > #define HW_COMPAT_2_3 \ Same as patch 3. Too late for 2.5, need do this for HW_COMPAT_2_5. Just for pcie, another choice is a new type with "is_express = true". But both method looks good to me.