From: David Gibson <david@gibson.dropbear.id.au>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>,
"Maxiwell S. Garcia" <maxiwell@linux.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface
Date: Wed, 3 Jul 2019 16:49:05 +1000 [thread overview]
Message-ID: <20190703064905.GN9442@umbus.fritz.box> (raw)
In-Reply-To: <155476288881.5793.5351161802797300445@sif>
[-- Attachment #1: Type: text/plain, Size: 5387 bytes --]
On Mon, Apr 08, 2019 at 05:34:48PM -0500, Michael Roth wrote:
> Quoting Greg Kurz (2019-04-08 11:31:56)
> > On Mon, 8 Apr 2019 14:21:50 +1000
> > David Gibson <david@gibson.dropbear.id.au> wrote:
> >
> > > On Fri, Mar 29, 2019 at 01:29:51PM +0100, Greg Kurz wrote:
> > > > On Thu, 28 Mar 2019 15:39:45 -0300
> > > > "Maxiwell S. Garcia" <maxiwell@linux.ibm.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > On Thu, Mar 28, 2019 at 02:21:51PM +0100, Greg Kurz wrote:
> > > > > > On Wed, 27 Mar 2019 17:41:00 -0300
> > > > > > "Maxiwell S. Garcia" <maxiwell@linux.ibm.com> wrote:
> > > > > >
> > > > > > > Here are two patches to add a handler for ibm,get-vpd RTAS calls.
> > > > > > > This RTAS exposes host information in case of set QEMU options
> > > > > > > 'host-serial' and 'host-model' as 'passthrough'.
> > > > > > >
> > > > > > > The patch 1 creates helper functions to get valid 'host-serial'
> > > > > > > and 'host-model' parameters, guided by QEMU command line. These
> > > > > > > parameters are useful to build the guest device tree and to return
> > > > > > > get-vpd RTAS calls. The patch 2 adds the ibm,get-vpd itself.
> > > > > > >
> > > > > > > Update v7:
> > > > > > > * rtas_get_vpd_fields as a static array in spapr machine state
> > > > > > >
> > > > > > > Maxiwell S. Garcia (2):
> > > > > > > spapr: helper functions to get valid host fields
> > > > > > > spapr-rtas: add ibm,get-vpd RTAS interface
> > > > > > >
> > > > > > > hw/ppc/spapr.c | 48 +++++++++++----------
> > > > > > > hw/ppc/spapr_rtas.c | 96 ++++++++++++++++++++++++++++++++++++++++++
> > > > > > > include/hw/ppc/spapr.h | 14 +++++-
> > > > > > > 3 files changed, 135 insertions(+), 23 deletions(-)
> > > > > > >
> > > > > >
> > > > > > Hi Maxiwell,
> > > > > >
> > > > > > David sent a patch to rework how the host data is exposed to the guest.
> > > > > > Especially, the special casing of the "none" and "passthrough" strings
> > > > > > is no more... I'm afraid you'll have to rework your patches accordingly:
> > > > > > code+changelog in patch 1 and at least changelog in patch 2.
> > > > > >
> > > > > > Cheers,
> > > > >
> > > > > IIUC, the 'ibm,get-vpd' RTAS should return information about the
> > > > > platform/cabinet. Thus, it's not necessary to add new nodes in the guest
> > > > > device tree to export information like that.
> > > >
> > > > I agree that these "host-model" and "host-serial" props, which aren't
> > > > described anywhere and not used by either the linux kernel or the
> > > > powerpc-utils, look like a QEMU-specific poor man's version of VPD.
> > > >
> > > > Not quite sure why they were even created since this is the purpose
> > > > of "system-id" and "model" as explained in PAPR, and supposedly
> > > > exposed in /proc/ppc64/lparcfg according to the LPARCFG(5) manual
> > > > page:
> > >
> > > Yeah, I'm not sure why they were created either. I rather suspect
> > > nothing much is using them, and I'd kind of like to just kill them.
> > > But Daniel Berrange (and maybe others) are paranoid about this
> > > breaking things.
> > >
> >
> > Speaking of that. The "host-model"/"host-serial" fix is associated to a
> > CVE which affects QEMU versions currently shipped by downstream vendors.
> > Isn't a good enough reason to break things in existing unsecure setups ?
> > Should we add this patch to Mike's patch round-up for stable 3.0.1 (and
> > therefore break something that used to _work_ with 3.0.0) ?
>
> Just for confirm: is the suggestion to backport 27461d69a? IIUC the fix
> would involve utilizing new command-line options to override the default
> "passthrough" mode for host-model/host-serial.
>
> If so, I think an argument could be made, but I generally try to avoid
> anything relying on new command-line options since they're unlikely to be
> utilized unless the distro/vendor are likely to have specific plans to use
> them
Yeah :/
> and implement the appropriate changes elsewhere in their stack to do
> so (e.g. stuff like Spectre mitigations). And, worst case, downstreams
> would still have the option of backporting the QEMU fixes as part of the
> overall CVE fix, so I'd probably opt to leave this one to the downstreams
> to consider.
So, in this case Openstack already does something similar for x86 - it
passes /etc/machine-id through the smbios information. Unfortunately
the way it passes that down to qemu is via an explicit -smbios option.
It would be nice to have a common "host-id" or whatever option to qemu
which will work for both x86 via smbios and power via device tree
and/or get-vpd. I had a look at that, and implementing it is fiddlier
than you'd think, because all the fallback logic and multiple pieces
to change (e.g. qemu would need to populate with explicit smbios info
first, then fall back to machine options, then libvirt would need a
common way to pass it through, then openstack would need to change to
use the common way, .... ugh).
At the moment this is in my "makes-my-brain-hurt-to-contemplate"
pile. I'm open to suggestions.
--
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: 833 bytes --]
next prev parent reply other threads:[~2019-07-03 13:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190327204102.20925-1-maxiwell@linux.ibm.com>
[not found] ` <20190328142151.7b0e00dd@bahia.lab.toulouse-stg.fr.ibm.com>
[not found] ` <20190328183923.lcd3p6fpy4qvvxoo@maxibm>
[not found] ` <20190329132951.451d4ef0@bahia.lan>
2019-04-01 15:01 ` [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface Maxiwell S. Garcia
2019-04-02 10:28 ` Greg Kurz
2019-04-03 21:07 ` Daniel Henrique Barboza
2019-04-04 8:45 ` Greg Kurz
2019-04-08 4:27 ` David Gibson
2019-04-08 4:27 ` David Gibson
2019-04-09 16:24 ` Andrea Bolognani
2019-04-09 16:24 ` Andrea Bolognani
2019-04-12 14:57 ` Greg Kurz
2019-04-12 14:57 ` Greg Kurz
2019-04-12 15:07 ` Daniel P. Berrangé
2019-04-12 15:07 ` Daniel P. Berrangé
2019-07-03 6:53 ` David Gibson
2019-04-08 4:21 ` David Gibson
2019-04-08 4:21 ` David Gibson
2019-04-08 16:31 ` Greg Kurz
2019-04-08 16:31 ` Greg Kurz
2019-04-08 22:34 ` Michael Roth
2019-04-08 22:34 ` Michael Roth
2019-07-03 6:49 ` David Gibson [this message]
2019-07-03 6:39 ` David Gibson
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=20190703064905.GN9442@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=maxiwell@linux.ibm.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).