From patchwork Sat Dec 12 12:00:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shmulik Ladkani X-Patchwork-Id: 556012 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 02994140B92 for ; Sat, 12 Dec 2015 23:02:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ravellosystems-com.20150623.gappssmtp.com header.i=@ravellosystems-com.20150623.gappssmtp.com header.b=EaaczQO9; dkim-atps=neutral Received: from localhost ([::1]:51540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7iss-0000Sm-1u for incoming@patchwork.ozlabs.org; Sat, 12 Dec 2015 07:02:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7irK-00063c-Nc for qemu-devel@nongnu.org; Sat, 12 Dec 2015 07:01:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7irJ-0007H9-RA for qemu-devel@nongnu.org; Sat, 12 Dec 2015 07:01:06 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:38187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7irJ-0007H5-MY for qemu-devel@nongnu.org; Sat, 12 Dec 2015 07:01:05 -0500 Received: by wmpp66 with SMTP id p66so5046354wmp.1 for ; Sat, 12 Dec 2015 04:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravellosystems-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/t11JQCUpd/1+nOIXdpJ65c5T0d/wqrHG7yIgopc/0c=; b=EaaczQO9sc6UePvUaIGIm6Wu9HEvx5crR4diAypXGsGRRY8t4JxpFed/bUXWYCYSaH rMSh4V2vtWe/N6RQ2Bnz7XET0RF8avUrE+qVg6tio2Yqw5ZoBm+IVjUUB9j0ixfm8Mdw laE94XkQGw3t8yHE9aKYPQNa/kfzDVl+amT5O+vpiV9HsnQ2dUJRx5gp8q/Dp6B9IFPp CXBm4JVwjE6gCZ2SovYKYd0dVzXnGmTfut7uxtDuRPw8XLMhTIAZ6tUweWnxqHvVGwZU w4hrGTimQ52Yf/dhNSRVC8m+NfKA4f1/IdwcLXhaqmb8yN4KDz+5tt5omKsPL/fyKkvp SjJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/t11JQCUpd/1+nOIXdpJ65c5T0d/wqrHG7yIgopc/0c=; b=kkubN0quywfHnKhSy6QEBfqSncVK4/l3haG9wgtRE+m1EXesvvMmTdm/4NClddZ73M 2xNdOEZTTXKrrUeEOgLv2CszWwzsJJWTKq92V3IundG4UunwnOWH5td3wdHjNx3NEp2A p2luZSRomWBS0hU+wMpLGuOfALo+m/dqKJS1Xa4E1nWWdVWnsxSuWKAKcyaxqc0u3yDd 1jgG/vYoA5ZfzQRX3TVZwRYf6ei4ajx2g9/enTwMVLzCO6VDXtuurtBHq9IUyA46tyrG c2CkrHA3l+Eb+kPIW2qg+PIubpPqKPQrljpVPpvpckzH2Oa9/NPi1WIkpoTsOpGpsEO6 L1fQ== X-Gm-Message-State: ALoCoQlbMKqALpLJoWcdZZq2U2h6m9EYsX8LcuPt7Mjfri3WKxLYrLnE6IpDH8xomfpWJdfwqt+w+9MmRw+8XRF5WcBEjgJkEQ== X-Received: by 10.28.170.66 with SMTP id t63mr12023914wme.40.1449921665079; Sat, 12 Dec 2015 04:01:05 -0800 (PST) Received: from honey.ravello.local ([213.57.127.2]) by smtp.gmail.com with ESMTPSA id n7sm7397438wmf.21.2015.12.12.04.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Dec 2015 04:01:04 -0800 (PST) From: Shmulik Ladkani To: Jason Wang , Dmitry Fleytman Date: Sat, 12 Dec 2015 14:00:40 +0200 Message-Id: <1449921644-31673-4-git-send-email-shmulik.ladkani@ravellosystems.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449921644-31673-1-git-send-email-shmulik.ladkani@ravellosystems.com> References: <1449921644-31673-1-git-send-email-shmulik.ladkani@ravellosystems.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 Cc: idan.brown@ravellosystems.com, qemu-devel@nongnu.org, Shmulik Ladkani Subject: [Qemu-devel] [PATCH v3 3/7] vmxnet3: Introduce 'x-old-msi-offsets' backword compatability 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 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 \