[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/7] e1000: Add support for migrating the ent
From: |
Jason Wang |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/7] e1000: Add support for migrating the entire MAC registers' array |
Date: |
Thu, 5 Nov 2015 10:35:15 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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.
[Qemu-devel] [PATCH v4 6/7] e1000: Fixing the packet address filtering procedure, Leonid Bloch, 2015/11/03
[Qemu-devel] [PATCH v4 7/7] e1000: Implementing various counters, Leonid Bloch, 2015/11/03
[Qemu-devel] [PATCH v4 5/7] e1000: Fixing the received/transmitted octets' counters, Leonid Bloch, 2015/11/03