qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: clg@kaod.org, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com,
	nikunj@linux.vnet.ibm.com, agraf@suse.de, abologna@redhat.com,
	armbru@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	quintela@redhat.com, dgilbert@redhat.com, sursingh@redhat.com,
	sbobroff@redhat.com
Subject: Re: [Qemu-devel] [PATCHv4 0/5] Clean up compatibility mode handling
Date: Tue, 30 May 2017 16:18:52 +1000	[thread overview]
Message-ID: <20170530061852.GE12163@umbus.fritz.box> (raw)
In-Reply-To: <20170530011416.01eea576@bahia.ttt.fr.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 4268 bytes --]

On Tue, May 30, 2017 at 01:14:16AM +0200, Greg Kurz wrote:
> On Fri, 26 May 2017 15:23:14 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> [...]
> > 
> > 
> > Changes since v3:
> >   * Backwards compatible -cpu handling now removes compat= option from
> >     options passed on to the cpu, so it doesn't trigger further warnings
> 
> This seems to also have another interesting effect.
> 
> getset_compat_deprecated() could be called either during CPU realization from:
> 
> object_property_parse()
> {
>     Visitor *v = string_input_visitor_new(string);
>     object_property_set(obj, v, name, errp);
>     ...
> }
> 
> or during a QOM set operation from:
> 
> void object_property_set_qobject(Object *obj, QObject *value,
>                                  const char *name, Error **errp)
> {
>     Visitor *v;
> 
>     v = qobject_input_visitor_new(value);
>     object_property_set(obj, v, name, errp);
>     ...
> }
> 
> or similarly during a QOM get operation with a QObject output visitor.
> 
> The realization path no longer exists with patch 2, so you don't need
> to implement a null string input visitor anymore.

s/patch 2/patch 3/?

Is that true though?  It shouldn't get called through that path in
practice, because we strip the compat property from the cpu object
properties.  But it could get called if either a) the user explicitly
creates a cpu object with -device CPU,compat=whatever or b) if the
user uses the compat= property with a machine type other than pseries.

Of course the user *shouldn't* do either of those things, but
providing a meaningful error if they do is pretty much the whole
purpose of this getter/setter method.

> 
> This means that patch 1 is no longer needed if I get things right but
> you probably want Markus to second that.
> 
> >   * Add a migration fix make cpu_synchronize_state() safe in post_load
> >     handlers, which in turn fixes a bug in 5/5.
> >   * A number of bugfixes and other tweaks suggested by feedback on v2.
> > 
> > Changes since RFCv2:
> >   * Many patches dropped, since they're already merged
> >   * Rebased, fixed conflicts
> >   * Restored support for backwards migration (wasn't as complicated as
> >     I thought)
> >   * Updated final patch's description to more accurately reflect the
> >     logic
> > 
> > Changes since RFCv1:
> >   * Change CAS logic to prefer compatibility modes over raw mode
> >   * Simplified by giving up on half-hearted attempts to maintain
> >     backwards migration
> >   * Folded migration stream changes into a single patch
> >   * Removed some preliminary patches which are already merged
> > 
> > David Gibson (4):
> >   migration: Mark CPU states dirty before incoming migration/loadvm
> >   pseries: Move CPU compatibility property to machine
> >   pseries: Reset CPU compatibility mode
> >   ppc: Rework CPU compatibility testing across migration
> > 
> > Greg Kurz (1):
> >   qapi: add explicit null to string input and output visitors
> > 
> >  cpus.c                       |   9 ++++
> >  hw/ppc/spapr.c               |   8 +++-
> >  hw/ppc/spapr_cpu_core.c      |  62 +++++++++++++++++++++-----
> >  hw/ppc/spapr_hcall.c         |   8 ++--
> >  include/hw/ppc/spapr.h       |  12 +++--
> >  include/sysemu/cpus.h        |   1 +
> >  include/sysemu/hax.h         |   1 +
> >  include/sysemu/hw_accel.h    |  10 +++++
> >  include/sysemu/kvm.h         |   1 +
> >  kvm-all.c                    |  10 +++++
> >  migration/savevm.c           |   2 +
> >  qapi/string-input-visitor.c  |  11 +++++
> >  qapi/string-output-visitor.c |  14 ++++++
> >  target/i386/hax-all.c        |  10 +++++
> >  target/ppc/compat.c          | 102 +++++++++++++++++++++++++++++++++++++++++++
> >  target/ppc/cpu.h             |   5 ++-
> >  target/ppc/machine.c         |  72 ++++++++++++++++++++++++++++--
> >  target/ppc/translate_init.c  |  86 +++++++++++-------------------------
> >  18 files changed, 340 insertions(+), 84 deletions(-)
> > 
> 



-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-05-30  6:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26  5:23 [Qemu-devel] [PATCHv4 0/5] Clean up compatibility mode handling David Gibson
2017-05-26  5:23 ` [Qemu-devel] [PATCHv4 1/5] qapi: add explicit null to string input and output visitors David Gibson
2017-05-26  5:23 ` [Qemu-devel] [PATCHv4 2/5] migration: Mark CPU states dirty before incoming migration/loadvm David Gibson
2017-05-29 20:46   ` Greg Kurz
2017-05-30  6:15     ` David Gibson
2017-05-30  9:14       ` Dr. David Alan Gilbert
2017-05-30 13:03   ` Juan Quintela
2017-05-26  5:23 ` [Qemu-devel] [PATCHv4 3/5] pseries: Move CPU compatibility property to machine David Gibson
2017-06-01  5:44   ` [Qemu-devel] [Qemu-ppc] " Suraj Jitindar Singh
2017-06-01  7:13     ` David Gibson
2017-06-01  7:29     ` Greg Kurz
2017-06-01 12:24       ` David Gibson
2017-06-01 15:44         ` Greg Kurz
2017-05-26  5:23 ` [Qemu-devel] [PATCHv4 4/5] pseries: Reset CPU compatibility mode David Gibson
2017-05-26  5:23 ` [Qemu-devel] [PATCHv4 5/5] ppc: Rework CPU compatibility testing across migration David Gibson
2017-06-01  6:23   ` [Qemu-devel] [Qemu-ppc] " Suraj Jitindar Singh
2017-06-01  8:23   ` [Qemu-devel] " Greg Kurz
2017-06-02  2:25     ` David Gibson
2017-05-29 23:14 ` [Qemu-devel] [PATCHv4 0/5] Clean up compatibility mode handling Greg Kurz
2017-05-30  6:18   ` David Gibson [this message]
2017-05-30  8:01     ` Greg Kurz
2017-05-31  2:57       ` David Gibson
2017-05-31  8:58         ` Greg Kurz
2017-06-01  6:52           ` David Gibson
2017-06-01 11:59             ` Cédric Le Goater
2017-06-01 13:09               ` Greg Kurz
2017-06-02  2:00                 ` David Gibson
2017-06-02  8:15                   ` Greg Kurz
2017-06-04 11:09                     ` David Gibson
2017-06-02  1:55               ` David Gibson
2017-06-01  6:59 ` no-reply

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=20170530061852.GE12163@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=abologna@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=dgilbert@redhat.com \
    --cc=groug@kaod.org \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=sbobroff@redhat.com \
    --cc=sursingh@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).