From nobody Tue Oct 28 01:48:53 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 --- 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