From nobody Sat Oct 25 23:35:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1522150779592834.0335335280311; Tue, 27 Mar 2018 04:39:39 -0700 (PDT) Received: from localhost ([::1]:33598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0mx0-00011b-Pe for importer@patchew.org; Tue, 27 Mar 2018 07:39:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0msd-0005aS-7H for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0msY-0007HJ-Bz for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42838 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f0msY-0007Gt-7B for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:02 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D989A4000B6E; Tue, 27 Mar 2018 11:34:59 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7BA37C33; Tue, 27 Mar 2018 11:34:58 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, eswierk@skyportsystems.com, jasowang@redhat.com Date: Tue, 27 Mar 2018 12:34:50 +0100 Message-Id: <20180327113452.19613-2-dgilbert@redhat.com> In-Reply-To: <20180327113452.19613-1-dgilbert@redhat.com> References: <20180327113452.19613-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 27 Mar 2018 11:34:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 27 Mar 2018 11:34:59 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 1/3] e1000: Convert v3 fields to subsection X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterx@redhat.com, quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" A bunch of new TSO fields were introduced by d62644b4 and this bumped the VMState version; however it's easier for those trying to keep backwards migration compatibility if these fields are added in a subsection instead. Move the new fields to a subsection. Since this was added after 2.11, this change will only affect compatbility with 2.12-rc0. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- hw/net/e1000.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index c7f1695f57..24e9a4ab40 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1433,9 +1433,29 @@ static const VMStateDescription vmstate_e1000_full_m= ac_state =3D { } }; =20 +static const VMStateDescription vmstate_e1000_tx_tso_state =3D { + .name =3D "e1000/tx_tso_state", + .version_id =3D 1, + .minimum_version_id =3D 1, + .fields =3D (VMStateField[]) { + VMSTATE_UINT8(tx.tso_props.ipcss, E1000State), + VMSTATE_UINT8(tx.tso_props.ipcso, E1000State), + VMSTATE_UINT16(tx.tso_props.ipcse, E1000State), + VMSTATE_UINT8(tx.tso_props.tucss, E1000State), + VMSTATE_UINT8(tx.tso_props.tucso, E1000State), + VMSTATE_UINT16(tx.tso_props.tucse, E1000State), + VMSTATE_UINT32(tx.tso_props.paylen, E1000State), + VMSTATE_UINT8(tx.tso_props.hdr_len, E1000State), + VMSTATE_UINT16(tx.tso_props.mss, E1000State), + VMSTATE_INT8(tx.tso_props.ip, E1000State), + VMSTATE_INT8(tx.tso_props.tcp, E1000State), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_e1000 =3D { .name =3D "e1000", - .version_id =3D 3, + .version_id =3D 2, .minimum_version_id =3D 1, .pre_save =3D e1000_pre_save, .post_load =3D e1000_post_load, @@ -1508,22 +1528,12 @@ static const VMStateDescription vmstate_e1000 =3D { VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, RA, 32), VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, MTA, 128), VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, VFTA, 128), - VMSTATE_UINT8_V(tx.tso_props.ipcss, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.ipcso, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.ipcse, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.tucss, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.tucso, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.tucse, E1000State, 3), - VMSTATE_UINT32_V(tx.tso_props.paylen, E1000State, 3), - VMSTATE_UINT8_V(tx.tso_props.hdr_len, E1000State, 3), - VMSTATE_UINT16_V(tx.tso_props.mss, E1000State, 3), - VMSTATE_INT8_V(tx.tso_props.ip, E1000State, 3), - VMSTATE_INT8_V(tx.tso_props.tcp, E1000State, 3), VMSTATE_END_OF_LIST() }, .subsections =3D (const VMStateDescription*[]) { &vmstate_e1000_mit_state, &vmstate_e1000_full_mac_state, + &vmstate_e1000_tx_tso_state, NULL } }; --=20 2.14.3 From nobody Sat Oct 25 23:35:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1522150618500581.3894618019963; Tue, 27 Mar 2018 04:36:58 -0700 (PDT) Received: from localhost ([::1]:33588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0muM-0006d2-Fu for importer@patchew.org; Tue, 27 Mar 2018 07:36:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0msd-0005b6-TJ for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0msY-0007HM-C6 for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54154 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f0msY-0007Gv-83 for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:02 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12128401CC48; Tue, 27 Mar 2018 11:35:01 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FB787C33; Tue, 27 Mar 2018 11:34:59 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, eswierk@skyportsystems.com, jasowang@redhat.com Date: Tue, 27 Mar 2018 12:34:51 +0100 Message-Id: <20180327113452.19613-3-dgilbert@redhat.com> In-Reply-To: <20180327113452.19613-1-dgilbert@redhat.com> References: <20180327113452.19613-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 27 Mar 2018 11:35:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 27 Mar 2018 11:35:01 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 2/3] e1000: wire new subsection to property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterx@redhat.com, quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Wire the new subsection from the previous commit to a property so we can turn it off easily. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- hw/net/e1000.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 24e9a4ab40..0562b8c547 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -123,9 +123,11 @@ typedef struct E1000State_st { #define E1000_FLAG_AUTONEG_BIT 0 #define E1000_FLAG_MIT_BIT 1 #define E1000_FLAG_MAC_BIT 2 +#define E1000_FLAG_TSO_BIT 3 #define E1000_FLAG_AUTONEG (1 << E1000_FLAG_AUTONEG_BIT) #define E1000_FLAG_MIT (1 << E1000_FLAG_MIT_BIT) #define E1000_FLAG_MAC (1 << E1000_FLAG_MAC_BIT) +#define E1000_FLAG_TSO (1 << E1000_FLAG_TSO_BIT) uint32_t compat_flags; } E1000State; =20 @@ -1407,6 +1409,13 @@ static bool e1000_full_mac_needed(void *opaque) return chkflag(MAC); } =20 +static bool e1000_tso_state_needed(void *opaque) +{ + E1000State *s =3D opaque; + + return chkflag(TSO); +} + static const VMStateDescription vmstate_e1000_mit_state =3D { .name =3D "e1000/mit_state", .version_id =3D 1, @@ -1437,6 +1446,7 @@ static const VMStateDescription vmstate_e1000_tx_tso_= state =3D { .name =3D "e1000/tx_tso_state", .version_id =3D 1, .minimum_version_id =3D 1, + .needed =3D e1000_tso_state_needed, .fields =3D (VMStateField[]) { VMSTATE_UINT8(tx.tso_props.ipcss, E1000State), VMSTATE_UINT8(tx.tso_props.ipcso, E1000State), @@ -1661,6 +1671,8 @@ static Property e1000_properties[] =3D { compat_flags, E1000_FLAG_MIT_BIT, true), DEFINE_PROP_BIT("extra_mac_registers", E1000State, compat_flags, E1000_FLAG_MAC_BIT, true), + DEFINE_PROP_BIT("migrate_tso_props", E1000State, + compat_flags, E1000_FLAG_TSO_BIT, true), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.14.3 From nobody Sat Oct 25 23:35:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1522150743883140.18954642858944; Tue, 27 Mar 2018 04:39:03 -0700 (PDT) Received: from localhost ([::1]:33596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0mwR-0000Pb-0x for importer@patchew.org; Tue, 27 Mar 2018 07:39:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0msd-0005aR-7G for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0msY-0007Hc-N4 for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44076 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f0msY-0007HS-Jt for qemu-devel@nongnu.org; Tue, 27 Mar 2018 07:35:02 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EF2884256; Tue, 27 Mar 2018 11:35:02 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CFA550331; Tue, 27 Mar 2018 11:35:01 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, eswierk@skyportsystems.com, jasowang@redhat.com Date: Tue, 27 Mar 2018 12:34:52 +0100 Message-Id: <20180327113452.19613-4-dgilbert@redhat.com> In-Reply-To: <20180327113452.19613-1-dgilbert@redhat.com> References: <20180327113452.19613-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 11:35:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 11:35:02 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterx@redhat.com, quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Turn the newly added subsection off for old machine types Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- include/hw/compat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/hw/compat.h b/include/hw/compat.h index bc9e3a6627..13242b831a 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -14,6 +14,10 @@ .driver =3D "vhost-user-blk-pci",\ .property =3D "vectors",\ .value =3D "2",\ + },{\ + .driver =3D "e1000",\ + .property =3D "migrate_tso_props",\ + .value =3D "off",\ }, =20 #define HW_COMPAT_2_10 \ --=20 2.14.3