From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, libvir-list@redhat.com,
"László Érsek" <lersek@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Peter Krempa" <pkrempa@redhat.com>
Subject: Re: [Qemu-devel] Configuring pflash devices for OVMF firmware
Date: Thu, 07 Feb 2019 10:30:46 +0100 [thread overview]
Message-ID: <87mun8gd2x.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <87y378n5iy.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Fri, 25 Jan 2019 16:03:33 +0100")
The thread got long, let me try to summarize, and elaborate a few
points.
* The problem at hand is configuring firmware residing in flash memory
(OVMF requires this) without legacy -drive.
* The wider problem is configuring onboard devices. Our general device
configuration interface doesn't cover them. Instead, we have a zoo of
ad hoc interfaces that are much more limited. Some of them we'd
rather deprecate (-drive, -net), but can't until we have a suitable
replacements.
I think a board should be a composite object that exposes properties
of its own and its parts, just like other composite devices, so that
"create, set properties, realize" just works. That would extend our
common device configuration mechanism naturally to onboard devices.
A PC board's flash memory device would be just another part. It could
be something like /machine/q35/cfi.pflash01/ in the QOM tree. To
configure it, you'd set its properties, such as
/machine/q35/cfi.pflash01/drive.
Note that this requires a way to set an existing device's properties.
Perhaps qom-set already works.
* While I do believe we should tackle the wider problem, I'd rather not
sit on the narrow problem until we crack it. So, what can we do about
it?
- Paolo proposed to add block backend properties to the PC machine,
settable like -machine pflash0=BLOCK-BACKEND.
Possible drawback: if we add /machine/q35/pflash0 to the QOM tree
now, and later replace it by /machine/q35/cfi.pflash01/drive, we'll
have to deal with yet another machine type variation. We'll live.
- I proposed to sidestep our onboard device configuration problem by
adding the cfi.pflash01 devices with our existing general device
configuration interface: -device. Possible since the onboard
cfi.pflash01 devices are optional. Requires a small extension to
the firmware descriptors, and a bit of extra work in libvirt to
process that extension. I think it's workable, but Paolo's idea is
simpler.
I can give Paolo's idea a try. Objections?
* A flash device supporting multiple regions is desirable, because it's
what physical hardware has. We currently use multiple flash devices
instead. We'll be stuck with them for existing machine types due to
guest ABI and migration compatibility.
* cfi.pflash01 currently requires users to opt out of "bad, do not use".
It should require opt in, to guard against accidental new uses of
"bad".
PS: Big thanks to László, whose patient guidance helped me map this part
of the jungle.
next prev parent reply other threads:[~2019-02-07 9:31 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 15:03 [Qemu-devel] Configuring pflash devices for OVMF firmware Markus Armbruster
2019-01-28 7:58 ` Laszlo Ersek
2019-01-28 10:39 ` Peter Maydell
2019-01-28 12:40 ` [Qemu-devel] [libvirt] " Gerd Hoffmann
2019-01-28 13:06 ` Peter Maydell
2019-01-28 14:55 ` Laszlo Ersek
2019-01-28 14:58 ` Peter Maydell
2019-01-28 15:03 ` Laszlo Ersek
2019-01-30 7:36 ` Markus Armbruster
2019-01-30 8:00 ` Gerd Hoffmann
2019-01-30 7:24 ` [Qemu-devel] " Markus Armbruster
2019-01-30 15:24 ` Peter Maydell
2019-01-30 16:44 ` Laszlo Ersek
2019-01-30 17:24 ` Peter Maydell
2019-01-31 8:52 ` Markus Armbruster
2019-01-31 10:01 ` Peter Maydell
2019-01-31 10:24 ` Markus Armbruster
2019-01-31 10:34 ` Peter Maydell
2019-01-31 12:05 ` Markus Armbruster
2019-01-30 14:13 ` Markus Armbruster
2019-01-30 14:33 ` Paolo Bonzini
2019-01-30 16:38 ` Laszlo Ersek
2019-01-31 8:33 ` Markus Armbruster
2019-01-31 9:19 ` Paolo Bonzini
2019-01-31 9:37 ` Markus Armbruster
2019-01-31 12:02 ` Laszlo Ersek
2019-01-31 12:10 ` Paolo Bonzini
2019-01-31 12:51 ` Markus Armbruster
2019-01-31 8:40 ` Markus Armbruster
2019-01-31 9:19 ` Paolo Bonzini
2019-01-31 9:41 ` Markus Armbruster
2019-01-31 10:12 ` Paolo Bonzini
2019-01-31 12:12 ` Markus Armbruster
2019-01-31 22:57 ` Paolo Bonzini
2019-01-31 23:28 ` Alexandro Sanchez Bach
2019-01-31 23:54 ` Paolo Bonzini
2019-02-01 2:49 ` Ning, Yu
2019-02-04 10:00 ` Paolo Bonzini
2019-02-01 8:58 ` Markus Armbruster
2019-01-31 11:57 ` Laszlo Ersek
2019-02-19 7:19 ` Markus Armbruster
2019-02-22 13:28 ` Markus Armbruster
2019-02-07 9:30 ` Markus Armbruster [this message]
2019-02-07 12:31 ` Laszlo Ersek
2019-02-07 13:49 ` Markus Armbruster
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=87mun8gd2x.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=lersek@redhat.com \
--cc=libvir-list@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.