From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIV6r-0002rc-GN for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIV6o-0008Rb-AA for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIV6n-0008RV-VD for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:38 -0500 From: Jason Wang Date: Mon, 11 Jan 2016 13:31:11 +0800 Message-Id: <1452490275-18217-21-git-send-email-jasowang@redhat.com> In-Reply-To: <1452490275-18217-1-git-send-email-jasowang@redhat.com> References: <1452490275-18217-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PULL 20/24] vmxnet3: Introduce 'x-disable-pcie' back-compat property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org, qemu-devel@nongnu.org Cc: Jason Wang , Shmulik Ladkani From: Shmulik Ladkani 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 Signed-off-by: Jason Wang --- 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 aee218c..67abad3 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2663,6 +2663,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 fd20d0e..98df0dd 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -6,6 +6,10 @@ .driver = "vmxnet3",\ .property = "x-old-msi-offsets",\ .value = "on",\ + },{\ + .driver = "vmxnet3",\ + .property = "x-disable-pcie",\ + .value = "on",\ }, #define HW_COMPAT_2_4 \ -- 2.5.0