[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsecti
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off |
Date: |
Tue, 27 Mar 2018 19:28:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 27/03/2018 18:47, Dr. David Alan Gilbert wrote:
>> So if the subsection is absent you
>> have to migrate either tx.tso_props or tx.props, depending on s->tx.cptse.
> Do you mean when sending you have to decide which set to send in the
> non-subsection data? And with cptse true that means use tso_props?
Yes.
>> Likewise if you migrate from older versions: if s->tx.props.tse &&
>> s->tx.cptse, you have to copy s->tx.props to s->tx.tso_props and clear
>> s->tx.props.
>
> I don't see any equivalent code in the existing non-subsection postload to
> do this; so I'm guessing there are some cases of 2.11->2.12 that will
> break at the moment?
Yes, I think so.
>> My understanding is that s->tx.tso_props.tse will be 1 if
>> and only if the source sent s->tx.tso_props.
> I don't see anything in the current code that migrates tso_props.tse -
> where does it come from?
Ouch... The tse field is more or less dead in current code AFAICS, but
it was used in the previous version. What's the best way then to find
if the subsection was transmitted? Do we have anything like a post_load
callback in the subsection itself?
To find out which "props" to transmit to older QEMU, you can add a
tp->use_tso_for_migration = tp->cptse just before "if (!(txd_lower &
E1000_TXD_CMD_EOP))" in process_tx_desc...
>> This seems most easily done with a new field (e.g. vmstate_fixed_props)
>> that is written in pre_save and set in post_load.
> It might need a VMSTATE_WITH_TMP to be able to do the saving part;
> when saving we can't change the current state when migrating
> to an old destination in case the migration fails and we just continue.
Perhaps you can just copy props/tso_props to a new field, and change all the
VMSTATE_UINT8(tx.props.ipcss, E1000State),
VMSTATE_UINT8(tx.props.ipcso, E1000State),
VMSTATE_UINT16(tx.props.ipcse, E1000State),
to
VMSTATE_UINT8(tx_legacy_vmstate_props.ipcss, E1000State),
...
and then add tx.props to the subsection together with tso.props.
New->old migration will place tx_legacy_vmstate_props in tx.props on the
destination; new->new will realize the subsection was transmitted and
ignore the tx_legacy_vmstate_props; old->new will not find data from the
subsection and copy the tx_legacy_vmstate_props into one of tx.props and
tx.tso_props.
Paolo
- [Qemu-devel] [PATCH 0/3] e1000 migration changes for 2.12, Dr. David Alan Gilbert (git), 2018/03/27
- [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Dr. David Alan Gilbert (git), 2018/03/27
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Paolo Bonzini, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Dr. David Alan Gilbert, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Dr. David Alan Gilbert, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Paolo Bonzini, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off, Ed Swierk, 2018/03/27
[Qemu-devel] [PATCH 2/3] e1000: wire new subsection to property, Dr. David Alan Gilbert (git), 2018/03/27
[Qemu-devel] [PATCH 1/3] e1000: Convert v3 fields to subsection, Dr. David Alan Gilbert (git), 2018/03/27
Re: [Qemu-devel] [PATCH 0/3] e1000 migration changes for 2.12, Jason Wang, 2018/03/27
Re: [Qemu-devel] [PATCH 0/3] e1000 migration changes for 2.12, Juan Quintela, 2018/03/27