From patchwork Mon Jan 11 05:31:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 565639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A18021402BF for ; Mon, 11 Jan 2016 16:41:16 +1100 (AEDT) Received: from localhost ([::1]:51686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIVEA-0000Rw-Hr for incoming@patchwork.ozlabs.org; Mon, 11 Jan 2016 00:41:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIV6X-0002E1-BL for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIV6U-0008Oq-6T for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIV6U-0008Ol-1q for qemu-devel@nongnu.org; Mon, 11 Jan 2016 00:33:18 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id AFA97C0AD1FD; Mon, 11 Jan 2016 05:33:17 +0000 (UTC) Received: from jason-ThinkPad-T430s.nay.redhat.com (dhcp-15-133.nay.redhat.com [10.66.15.133]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0B5VfLh018161; Mon, 11 Jan 2016 00:33:13 -0500 From: Jason Wang To: peter.maydell@linaro.org, qemu-devel@nongnu.org Date: Mon, 11 Jan 2016 13:31:07 +0800 Message-Id: <1452490275-18217-17-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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Jason Wang , Shmulik Ladkani Subject: [Qemu-devel] [PULL 16/24] vmxnet3: Introduce 'x-old-msi-offsets' back-compat property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Shmulik Ladkani 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 Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 ++ include/hw/compat.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 4e1534b..f398dea 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2593,6 +2593,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 3d8d2a9..fd20d0e 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -2,7 +2,11 @@ #define HW_COMPAT_H #define HW_COMPAT_2_5 \ - /* empty */ + {\ + .driver = "vmxnet3",\ + .property = "x-old-msi-offsets",\ + .value = "on",\ + }, #define HW_COMPAT_2_4 \ {\