qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>, Peter Krempa <pkrempa@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	libvir-list@redhat.com, Michal Privoznik <mprivozn@redhat.com>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
	Gary Ching-Pang Lin <glin@suse.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	David Gibson <dgibson@redhat.com>
Subject: Re: [Qemu-devel] [libvirt] [qemu RFC v2] qapi: add "firmware.json"
Date: Fri, 20 Apr 2018 10:34:57 +0100	[thread overview]
Message-ID: <20180420093457.GE21035@redhat.com> (raw)
In-Reply-To: <a9006770-b4e3-cf57-3efa-c967740f7a94@redhat.com>

On Fri, Apr 20, 2018 at 10:11:08AM +0200, Laszlo Ersek wrote:
> On 04/19/18 11:12, Daniel P. Berrangé wrote:
> > On Thu, Apr 19, 2018 at 10:39:32AM +0200, Laszlo Ersek wrote:
> >> On 04/19/18 09:56, Daniel P. Berrangé wrote:
> >>> On Thu, Apr 19, 2018 at 09:48:36AM +0200, Markus Armbruster wrote:
> >>>> Laszlo Ersek <lersek@redhat.com> writes:
> >>>>
> >>>>> On 04/18/18 10:47, Markus Armbruster wrote:
> >>>>>> Laszlo Ersek <lersek@redhat.com> writes:
> >>>> Replacing CpuInfoArch by such an enum will change the discriminator
> >>>> value from "other" to the real architecture, with the obvious
> >>>> compatibility concerns.  But we've accepted similar changes twice
> >>>> already: commit 9d0306dfdfb and commit 25fa194b7b1, both v2.12.0-rc0.
> >>>>
> >>>> "other" was a bad idea.  Hindsight 20/20.
> >>>>
> >>>> Getting rid of it in one go rather than piecemeal seems like the least
> >>>> bad way out.  Too late for 2.12, though.  Eric, what do you think?
> >>>
> >>> Given the context in which this "other" value is used, I think it is
> >>> reasonable to kill it and put a full arch list in there.
> >>>
> >>> No app is likely to be accessing the struct under "other" because it
> >>> is just an empty placeholder.
> >>
> >> Commit 9d0306dfdfb added "s390" and "CpuInfoS390", which I guess had the
> >> potential to confuse QMP clients that didn't expect "s390", but
> >> otherwise it didn't mess with preexistent enum values / structures.
> > 
> > NB, qemu-system-s390x would previously have returned "other" in
> > this field, and now it returns "s390".  So while it didn't
> > remove "other" from the list of things that could potentially
> > exist, it did change what the s390x binary will actually report.
> > 
> >> The same applies to commit 25fa194b7b1, just with "riscv" /
> >> "CpuInfoRISCV" substituted.
> >>
> >> Removing "other" might confuse QMP clients that expect it, except
> >> (according to Daniel) no such client exists, probably.
> > 
> > When I say removing "other", I imply that we add an explicit arch
> > for all those which we currently are missing. IOW, all qemu-system-XXX
> > binaries which currently report "other" would change to report their
> > respective "XXX" values.
> > 
> > So in this way, it is exactly the same as what we did when we
> > introduced "s390" as an option.
> > 
> > The only difference is that once we have every binary reporting the
> > correct arch, we can now also remove "other" from the schema itself
> > as it will then be unused.
> 
> Can we please translate this into more actionable items for me, because
> I'm getting confused :)
> 
> First, if I add "i386" and "x86_64" to the enum list, we'll have all
> three of "i386", "x86_64" and "x86". Is that useful? How will that work?

Hmm, yes, on closer look this is a big mess as it is. We've been using
generic terms for covering multiple architectures :-(  'x86' for both
i386 and x86_64,  'sparc' for sparc and sparc64, etc. If we try to fix
that we'll be entering a world of backcompat hurt :-(

Since your schema is likely to end up just being a file in docs/specs,
rather than directly part of our existnig qapi schema, I suggest we just
ignore whats there. Just define an arch enum in your spec which is right,
and let someone else worry about fixing the mess

> Second, assuming I add constants for the ~10 (?) softmmu arches, can I
> still use @CpuInfoOther as the type for the corresponding new members in
> @CpuInfo? What C code changes will be necessary?

Yes, we could still use the CpuInfoOther struct, since struct names are
invisible to consumers, but as above, lets ignore the mess

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2018-04-20  9:35 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 22:40 [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json" Laszlo Ersek
2018-04-18  6:02 ` Gerd Hoffmann
2018-04-18  8:32   ` Laszlo Ersek
2018-04-18  9:04     ` Gerd Hoffmann
2018-04-18 11:48       ` Laszlo Ersek
2018-04-18 11:57         ` Daniel P. Berrangé
2018-04-18 12:30           ` Gerd Hoffmann
2018-04-18 12:32             ` Daniel P. Berrangé
2018-04-18 12:57               ` Laszlo Ersek
2018-04-18 12:23         ` Gerd Hoffmann
2018-04-18 12:56           ` Laszlo Ersek
2018-04-18 13:06             ` Gerd Hoffmann
2018-04-18 13:30               ` Laszlo Ersek
2018-04-18 13:53                 ` Daniel P. Berrangé
2018-04-18 14:03                   ` Laszlo Ersek
2018-04-18 14:06                     ` Daniel P. Berrangé
2018-04-18 14:45                       ` Laszlo Ersek
2018-04-19  0:09     ` David Gibson
2018-04-19  8:09       ` Laszlo Ersek
2018-04-20  1:03         ` David Gibson
2018-04-20  8:47           ` Paolo Bonzini
2018-04-20  9:01             ` Laszlo Ersek
2018-04-19  8:45   ` Thomas Huth
2018-04-18  8:47 ` Markus Armbruster
2018-04-18 11:35   ` Laszlo Ersek
2018-04-19  7:48     ` Markus Armbruster
2018-04-19  7:56       ` [Qemu-devel] [libvirt] " Daniel P. Berrangé
2018-04-19  8:39         ` Laszlo Ersek
2018-04-19  9:12           ` Daniel P. Berrangé
2018-04-20  8:11             ` Laszlo Ersek
2018-04-20  9:34               ` Daniel P. Berrangé [this message]
2018-04-20  9:46                 ` Gerd Hoffmann
2018-04-20  9:50                   ` Daniel P. Berrangé
2018-04-20 10:41                     ` Gerd Hoffmann
2018-04-20 15:45                       ` Laszlo Ersek
2018-04-20 15:39                 ` Laszlo Ersek
2018-04-23  0:10                 ` David Gibson
2018-04-23  9:39                   ` Daniel P. Berrangé
2018-04-20 12:53           ` Markus Armbruster
2018-04-20 16:04             ` Laszlo Ersek
2018-04-20 16:37               ` Markus Armbruster
2018-04-20 23:25                 ` Laszlo Ersek
2018-04-18  9:43 ` [Qemu-devel] " Paolo Bonzini
2018-04-18 11:52   ` Laszlo Ersek
2018-04-18 12:03     ` Daniel P. Berrangé
2018-04-18 12:36       ` Gerd Hoffmann
2018-04-18 12:40       ` Laszlo Ersek
2018-04-18 15:17         ` Eric Blake
2018-04-18 15:27           ` Laszlo Ersek
2018-04-18 15:28             ` Daniel P. Berrangé
2018-04-18 15:30             ` Laszlo Ersek
2018-04-19  8:57 ` Thomas Huth

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=20180420093457.GE21035@redhat.com \
    --to=berrange@redhat.com \
    --cc=agraf@suse.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=armbru@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=glin@suse.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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).