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.