qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, eswierk@skyportsystems.com,
	jasowang@redhat.com, peterx@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off
Date: Tue, 27 Mar 2018 17:47:54 +0100	[thread overview]
Message-ID: <20180327164753.GF2837@work-vm> (raw)
In-Reply-To: <0bfadead-a3c2-9bce-3e53-8ca3a258a57a@redhat.com>

* Paolo Bonzini (pbonzini@redhat.com) wrote:
> On 27/03/2018 13:34, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Turn the newly added subsection off for old machine types
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  include/hw/compat.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/hw/compat.h b/include/hw/compat.h
> > index bc9e3a6627..13242b831a 100644
> > --- a/include/hw/compat.h
> > +++ b/include/hw/compat.h
> > @@ -14,6 +14,10 @@
> >          .driver   = "vhost-user-blk-pci",\
> >          .property = "vectors",\
> >          .value    = "2",\
> > +    },{\
> > +        .driver   = "e1000",\
> > +        .property = "migrate_tso_props",\
> > +        .value    = "off",\
> >      },
> >  
> >  #define HW_COMPAT_2_10 \
> > 
> 
> Unfortunately it's not that easy, because on old machine types
> tx.tso_props was stored in tx.props.

OK, this pretty much sounds like the answer to the question I asked on
the cover letter.

> 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?

> 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?

> 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?

> 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.

How would I test this lot?

Dave

> Paolo
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2018-03-27 16:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 11:34 [Qemu-devel] [PATCH 0/3] e1000 migration changes for 2.12 Dr. David Alan Gilbert (git)
2018-03-27 11:34 ` [Qemu-devel] [PATCH 1/3] e1000: Convert v3 fields to subsection Dr. David Alan Gilbert (git)
2018-03-27 11:34 ` [Qemu-devel] [PATCH 2/3] e1000: wire new subsection to property Dr. David Alan Gilbert (git)
2018-03-27 11:34 ` [Qemu-devel] [PATCH 3/3] e1000: Old machine types, turn new subsection off Dr. David Alan Gilbert (git)
2018-03-27 16:07   ` Paolo Bonzini
2018-03-27 16:47     ` Dr. David Alan Gilbert [this message]
2018-03-27 17:28       ` Paolo Bonzini
2018-03-27 18:01         ` Dr. David Alan Gilbert
2018-03-27 20:17           ` Paolo Bonzini
2018-03-28  0:31         ` Ed Swierk
2018-03-27 13:06 ` [Qemu-devel] [PATCH 0/3] e1000 migration changes for 2.12 Jason Wang
2018-03-27 14:26   ` Dr. David Alan Gilbert
2018-03-27 23:53     ` Ed Swierk
2018-03-28  2:45     ` Jason Wang
2018-03-27 14:06 ` Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180327164753.GF2837@work-vm \
    --to=dgilbert@redhat.com \
    --cc=eswierk@skyportsystems.com \
    --cc=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).