From: Paolo Bonzini <pbonzini@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Thomas Huth <thuth@redhat.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-devel <qemu-devel@nongnu.org>,
Cornelia Huck <conny@cornelia-huck.de>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: VW ELF loader
Date: Mon, 10 Feb 2020 12:26:07 +0100 [thread overview]
Message-ID: <29abb8fe-f094-689f-2e3d-5462692048fd@redhat.com> (raw)
In-Reply-To: <20200210072802.GD22584@umbus.fritz.box>
On 10/02/20 08:28, David Gibson wrote:
> On Thu, Feb 06, 2020 at 09:27:01AM +0100, Paolo Bonzini wrote:
>> On 05/02/20 07:06, David Gibson wrote:
>>> On Tue, Feb 04, 2020 at 12:26:32AM +0100, Paolo Bonzini wrote:
>> I'm really sorry if what I am saying is stupid; but I was thinking of a
>> firmware entrypoint like
>>
>> if (op == "read" || op == "write")
>> do_driver_stuff(op);
>> else
>> hypercall();
>
> Um... I'm not really clear on where you're imagining this going. In
> the OF model, device operations are done by "opening" a device tree
> node then executing methods on it, so you can't really even get to
> this point without a bunch of DT stuff.
Could you delegate that part to QEMU, as in the v6 patches? The
firmware would record the path<->ihandle association on open and close,
and then you can use that when GRUB does "read" and "write" to invoke
the appropriate driver.
>> This is not even close to pseudocode, but hopefully enough to give the
>> idea. Perhaps what I don't understand is why you can't start the
>> firmware with r3 pointing to the device tree, and stash it for when you
>> leave control to GRUB.
>
> Again, I'm not even really sure what you mean by this. We already
> enter SLOF with r3 pointing to a device tree. I'm not sure what
> stashing it would accomplish. GRUB as it stands expects an OF style
> entry point though, not a flat tree style entry point.
Again, sorry if what I'm saying makes little sense. The terminology is
certainly off. What I mean is:
- read the device tree, instantiate all PCI and virtio drivers
- keep the device tree around for use while GRUB is running
- find and invoke GRUB
- on the OF entry point, wrap open and close + handle the disk and
network entry points, and pass everything else to QEMU.
>> The TTY can use the simple
>> getchar/putchar hypercalls,
>
> Yes... though if people attach a graphical console they might be
> pretty surprised that they don't get anything on there.
They wouldn't with Alexey's code either, would they? And it would be
yet another QEMU backend to hook into, while with firmware it would be
lots of code to write but super-boring and something that has been done
countless times.
> We can possibly ignore the spapr virtual devices. They seemed like
> they'd be important for people transitioning from guests under
> PowerVM, but honestly I'm not sure they've ever been used much.
>
> We do support emulated (or passthrough) PCI devices. I don't know if
> they're common enough that we need boot support for them. Netboot
> from a vfio network adaptor might be something people want.
Can you get that with SLOF?
> USB storage is also a fairly likely candidate, and that would add a
> *lot* of extra complexity, since we'd need both the HCD and storage
> drivers.
Any reason to make it USB and not a virtio-blk device? (On x86 these
days you only add USB storage disks to a VM in order to get drivers to
Windows).
Paolo
next prev parent reply other threads:[~2020-02-10 11:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 13:39 VW ELF loader Alexey Kardashevskiy
2020-02-01 19:04 ` Paolo Bonzini
2020-02-02 11:51 ` Alexey Kardashevskiy
2020-02-02 17:38 ` Paolo Bonzini
2020-02-03 1:31 ` David Gibson
2020-02-03 1:28 ` David Gibson
2020-02-03 9:12 ` Paolo Bonzini
2020-02-03 9:50 ` David Gibson
2020-02-03 10:58 ` Alexey Kardashevskiy
2020-02-03 15:08 ` Paolo Bonzini
2020-02-03 22:36 ` Alexey Kardashevskiy
2020-02-03 22:56 ` Paolo Bonzini
2020-02-03 23:19 ` Alexey Kardashevskiy
2020-02-03 23:26 ` Paolo Bonzini
2020-02-04 6:16 ` Thomas Huth
2020-02-04 8:54 ` Cornelia Huck
2020-02-04 9:20 ` Restrictions of libnet (was: Re: VW ELF loader) Thomas Huth
2020-02-04 9:32 ` Thomas Huth
2020-02-04 9:33 ` Michal Suchánek
2020-02-05 5:30 ` David Gibson
2020-02-05 6:24 ` Thomas Huth
2020-02-10 7:55 ` David Gibson
2020-02-10 9:39 ` Michal Suchánek
2020-02-13 3:16 ` David Gibson
2020-02-04 23:18 ` VW ELF loader Alexey Kardashevskiy
2020-02-05 6:06 ` David Gibson
2020-02-05 9:28 ` Cornelia Huck
2020-02-06 4:47 ` David Gibson
2020-02-06 8:27 ` Paolo Bonzini
2020-02-06 23:17 ` Alexey Kardashevskiy
2020-02-06 23:45 ` Paolo Bonzini
2020-02-10 7:30 ` David Gibson
2020-02-10 10:37 ` Peter Maydell
2020-02-10 11:25 ` Paolo Bonzini
2020-02-14 3:23 ` David Gibson
2020-02-10 7:28 ` David Gibson
2020-02-10 11:26 ` Paolo Bonzini [this message]
2020-02-14 4:02 ` David Gibson
2020-02-05 5:58 ` David Gibson
2020-02-06 8:29 ` Paolo Bonzini
2020-02-06 23:23 ` Alexey Kardashevskiy
2020-02-06 23:46 ` Paolo Bonzini
2020-02-10 0:31 ` Alexey Kardashevskiy
2020-02-13 1:43 ` Alexey Kardashevskiy
2020-02-13 10:17 ` Paolo Bonzini
2020-02-14 0:01 ` Alexey Kardashevskiy
2020-02-14 2:30 ` David Gibson
2020-02-04 9:40 ` Christian Borntraeger
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=29abb8fe-f094-689f-2e3d-5462692048fd@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--cc=borntraeger@de.ibm.com \
--cc=conny@cornelia-huck.de \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--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).