From: "Michael S. Tsirkin" <mst@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: pbonzini@redhat.com, "Gabriel L. Somlo" <somlo@cmu.edu>,
Gerd Hoffmann <kraxel@redhat.com>,
armbru@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] vl.c: disallow command line fw cfg without opt/
Date: Thu, 17 Mar 2016 15:35:13 +0200 [thread overview]
Message-ID: <20160317153203-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <56EAB106.9020905@redhat.com>
On Thu, Mar 17, 2016 at 02:28:38PM +0100, Laszlo Ersek wrote:
> On 03/17/16 11:22, Gerd Hoffmann wrote:
> > Hi,
> >
> >> Occasionally, yes.
> >>
> >> - "opt/ovmf/PcdPropertiesTableEnable" controls whether the "properties
> >
> >> - "opt/ovmf/PcdSetNxForStack" controls whether the stack is made
> >
> >> - "opt/ovmf/X-PciMmio64Mb" controls the size of the range from which the
> >
> >> In downstream, we have two more (same purpose but separately for ARM and
> >> x86):
> >> - opt/aavmf/PcdResizeXterm
> >> - opt/ovmf/PcdResizeXterm
> >>
> >> - Another flag I might expose later is "PcdHiiOsRuntimeSupport". This
> >
> > I think we should probably move those out of the opt/ namespace space,
> > as this is reserved for user-defined files.
> >
> > I think either "etc/efi/"
>
> This is more or less what Paolo suggests.
>
> It confuses me.
>
> I have now re-read the last section of "docs/specs/fw_cfg.txt" to make
> sure my current mental image of the original idea has not diverged from
> the actual original idea. I don't think so.
>
> So, "user defined files" exist so that users can control "stuff" with
> them, without QEMU's knowledge. OVMF is "stuff". Just because it's
> firmware, it remains "stuff". Whatever Gabriel wants to control with
> such fw_cfg files in the guest, is also "stuff". I don't see any
> difference between a user controlling an ad-hoc application of his with
> "opt/blah1", and controlling OVMF behavior under "opt/ovmf/xizzy". If
> the user tries to control his own app by choosing the name
> "opt/ovmf/xizzy", that's *his* fault. "opt/ovmf/" is not a prefix
> someone comes up with by chance.
>
> We meant just two partitions of the namespace. "opt/" and non-"opt/".
> The latter belongs to QEMU, the former belongs to everything else, and
> the subdivision of everything else doesn't belong into QEMU. OVMF is
> part of everything else.
This is where we made a design mistake. There are 3 kinds of users
adding entries: QEMU, QEMU firmware developers and QEMU users.
And QEMU users could be further subdivided.
> If we're paranoid about it, we can make a recommendation that each user
> pick "opt/UUID/..." for himself, running "uuidgen" and then sticking
> with the output for his own stuff. That will guarantee that no conflicts
> will be seen. OVMF could be adapted to that as well. (The only snag with
> uuidgen is that it would leave only 56 - 4 - 36 - 1 == 15 characters for
> the actual knob name.)
>
> Choosing "etc/" for such files of OVMF that are passed in with the
> -fw_cfg switch would be the textbook example of violating the original
> idea, because etc/ is heavily populated by QEMU itself.
>
> > or "efi/" is useful (so we don't have
> > different names on ovmf and aavmf).
>
> I dislike efi/. It suggests that it controls some features that all UEFI
> implementations offer.
>
> > Possibly add "pcd/". Maybe even
> > support setting *any* pcd via "efi/pcd/$name" (just an idea, not sure
> > whenever that is useful and is possible without being too invasive).
>
> It's all of: too invasive, not always useful, and not flexible enough.
> Knobs should be exposed (with their different value domains) on a
> case-by-case basis.
>
> >> - "opt/ovmf/X-PciMmio64Mb" controls the size of the range from which
> >
> > Hmm. Leave as-is for now I'd say.
>
> Will do.
>
> > If we decide to keep it we should
> > probably rename it and place it below etc/, next to reserved-memory-end.
> > Export the size in bytes, like reserved-memory-end does. Add an option
> > to qemu to set it, so you can specify the size as "32G" using the
> > standard qemu size parser.
>
> I certainly don't disagree with this, but if it goes under etc/, and --
> hence necessarily -- also gets its own command line option, then SeaBIOS
> should probably adhere to it as well (or the QEMU manual should state
> that this option is also firmware specific).
>
> Thanks
> Laszlo
next prev parent reply other threads:[~2016-03-17 13:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 14:47 [Qemu-devel] [PATCH v2] vl.c: disallow command line fw cfg without opt/ Michael S. Tsirkin
2016-03-16 16:29 ` Markus Armbruster
2016-03-16 16:50 ` Michael S. Tsirkin
2016-03-16 18:15 ` Gabriel L. Somlo
2016-03-16 18:35 ` Laszlo Ersek
2016-03-16 18:43 ` Michael S. Tsirkin
2016-03-16 19:15 ` Laszlo Ersek
2016-03-16 20:22 ` Michael S. Tsirkin
2016-03-16 20:24 ` Michael S. Tsirkin
2016-03-16 20:31 ` Michael S. Tsirkin
2016-03-17 8:49 ` Laszlo Ersek
2016-03-17 9:40 ` Paolo Bonzini
2016-03-17 11:32 ` Michael S. Tsirkin
2016-03-17 13:12 ` Paolo Bonzini
2016-03-17 13:15 ` Michael S. Tsirkin
2016-03-17 8:42 ` Gerd Hoffmann
2016-03-17 9:43 ` Laszlo Ersek
2016-03-17 10:22 ` Gerd Hoffmann
2016-03-17 13:28 ` Laszlo Ersek
2016-03-17 13:35 ` Michael S. Tsirkin [this message]
2016-03-17 13:37 ` Paolo Bonzini
2016-03-17 16:59 ` Gerd Hoffmann
2016-03-17 13:23 ` Michael S. Tsirkin
2016-03-17 9:49 ` Laszlo Ersek
2016-03-17 10:09 ` Markus Armbruster
2016-03-17 13:13 ` Michael S. Tsirkin
2016-03-17 13:30 ` Paolo Bonzini
2016-03-17 13:49 ` Laszlo Ersek
2016-03-17 13:49 ` Michael S. Tsirkin
2016-03-17 13:55 ` Paolo Bonzini
2016-03-17 14:17 ` Michael S. Tsirkin
2016-03-17 14:50 ` Paolo Bonzini
2016-03-17 15:40 ` Michael S. Tsirkin
2016-03-17 17:17 ` Gerd Hoffmann
2016-03-17 19:35 ` Paolo Bonzini
2016-03-17 19:55 ` Michael S. Tsirkin
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=20160317153203-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=somlo@cmu.edu \
/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).