From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuAPI-0003qC-3M for qemu-devel@nongnu.org; Wed, 04 Nov 2015 21:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuAOZ-0006p9-VS for qemu-devel@nongnu.org; Wed, 04 Nov 2015 21:36:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuAOZ-0006o0-Nb for qemu-devel@nongnu.org; Wed, 04 Nov 2015 21:35:23 -0500 References: <1446549255-26172-1-git-send-email-leonid.bloch@ravellosystems.com> <1446549255-26172-3-git-send-email-leonid.bloch@ravellosystems.com> <56396ED7.6030806@redhat.com> From: Jason Wang Message-ID: <563AC063.4050706@redhat.com> Date: Thu, 5 Nov 2015 10:35:15 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/7] e1000: Add support for migrating the entire MAC registers' array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Bloch Cc: Dmitry Fleytman , Leonid Bloch , qemu-devel@nongnu.org, Shmulik Ladkani On 11/04/2015 10:48 PM, Leonid Bloch wrote: >>> >> }, >>> >> .subsections = (const VMStateDescription*[]) { >>> >> &vmstate_e1000_mit_state, >>> >> + &vmstate_e1000_full_mac_state, >>> >> + &vmstate_e1000_compat_mac_state, >>> >> NULL >>> >> } >> > >> > I'm afraid this will break migration to older qemu. Consider the case >> > when full_mac_registers=off, we save compat mac registers as a >> > subsection, this breaks the assumption on load who expect all compact >> > registers just after phy_reg. (You can just test this with a simple >> > 'savevm' with full_mac_register_off and the revert this patch and do a >> > 'loadvm'), Looks like the safe way is to just add a >> > vmstate_e1000_full_mac_state and keep other fields of vmstate_e1000 >> > unmodified. > You are right! Thanks. >> > >>> >> }; >>> >> @@ -1603,6 +1640,8 @@ static Property e1000_properties[] = { >>> >> compat_flags, E1000_FLAG_AUTONEG_BIT, true), >>> >> DEFINE_PROP_BIT("mitigation", E1000State, >>> >> compat_flags, E1000_FLAG_MIT_BIT, true), >>> >> + DEFINE_PROP_BIT("full_mac_registers", E1000State, >>> >> + compat_flags, E1000_FLAG_MAC_BIT, true), >>> >> DEFINE_PROP_END_OF_LIST(), >>> >> }; >>> >> >> > >> > Need also turn this off for pre 2.5 machines in HW_COMPAT_2_4. > Thanks for reminding! > BTW, HW_COMPAT is simply the new version of PC_COMPAT, or am I wrong? > > Leonid. > HW_COMPAT contains compatibility options that could be used by all targets (e.g both ppc and x86). PC_COMPAT contains pc specific options. So usually PC_COMPAT is a superset of HW_COMPAT.