qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Paolo Bonzini <pbonzini@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Cornelia Huck <conny@cornelia-huck.de>,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: VW ELF loader
Date: Tue, 4 Feb 2020 09:36:06 +1100	[thread overview]
Message-ID: <d63ba962-ffbb-9f27-34fb-657188e90194@ozlabs.ru> (raw)
In-Reply-To: <8420784f-b4c7-9864-8534-b94dbc5f74ff@redhat.com>



On 04/02/2020 02:08, Paolo Bonzini wrote:
> On 03/02/20 11:58, Alexey Kardashevskiy wrote:
>>>> So really, the question isn't whether we implement things in firmware
>>>> or in qemu.  It's whether we implement the firmware functionality as
>>>> guest cpu code, which needs to be coded to work with a limited
>>>> environment, built with a special toolchain, then emulated with TCG.
>>>> Or, do we just implement it in normal C code, with a full C library,
>>>> and existing device and backend abstractions inside qemu.
>>>
>>> ... which is adding almost 2000 lines of new code to the host despite
>>> the following limitations:
>>>
>>>> 4. no networking in OF CI at all;
>>>> 5. no vga;
>>>> 6. no disk partitions in CI, i.e. no commas to select a partition -
>>>> this relies on a bootloader accessing the disk as a whole;
>>
>> This is not going to be a lot really, especially supporting partitions -
>> the code is practically there already as I needed it to find GRUB, and
>> GRUB does the rest asking very little from the firmware to work.
> 
> What partition formats would have to be supported? 

MBR, GPT, is there anything else? "Support" is limited to converting a
number after command to [start, size] couple. I am not going for file
systems.

> But honestly I'm
> more worried about the networking part.

Fair enough.

>> btw what is the common way of netbooting in x86? NIC ROM or GRUB (but
>> this would be a disk anyway)? Can we consider having a precompiled GRUB
>> image somewhere in pc-bios/ to use for netboot? Or Uboot would do (it is
>> already in pc-bios/, no?), I suppose?
> 
> GRUB netboot support is almost never used. 

Huh. We use yaboot here in Ozlabs for netbooting quite a lot.

> There are three cases:
> 
> - QEMU BIOS: the NIC ROM contain iPXE, which is both the driver code and
> the boot loader (which chains into GRUB).
> 
> - Bare metal BIOS: same, but the boot loader is minimal so most of the
> time iPXE is loaded via TFTP and reuses the NIC ROM's driver code.
> 
> - UEFI: the NIC ROM contains driver code only and the firmware does the
> rest.

Well, we never really had this luxury of NIC ROM, there were a couple of
NICs with fcode which never really worked in SLOF.

Oh well, this is probably the time to look into netbooting then.


>>> In other words you're not dropping SLOF, you're really dropping
>>> OpenFirmware completely.
>>
>> What is the exact benefit of having OpenFirmware's "interpret"?
> 
> None, besides being able to play space invaders written in Forth.  I'm
> not against dropping most OpenFirmware capabilities, I'm against adding
> a limited (or broken depending on what you're trying to do) version that
> runs in the host.
> 
> Yes, SLOF is big and slow.  petitboot is not petit at all either, and
> has the disadvantage that you have to find a way to run GRUB afterwards.
>  But would a similarly minimal OF implementation (no network, almost no
> interpret so no Forth, device tree built entirely in the host, etc.)

The device tree is almost completely built in QEMU these days anyway,
twice during normal boot.

> be just as big and slow?

I doubt. We will be getting rid of unnecessary drivers, bus scanning
code (SCSI, PCI), device tree synchronization.


-- 
Alexey


  reply	other threads:[~2020-02-03 22:38 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 [this message]
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
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=d63ba962-ffbb-9f27-34fb-657188e90194@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=borntraeger@de.ibm.com \
    --cc=conny@cornelia-huck.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --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).