On 07/02/2020 10:46, Paolo Bonzini wrote:
> On 07/02/20 00:23, Alexey Kardashevskiy wrote:
>>> Right, not unlike what you get with vof=on. :) I'm not against at all
>>> that idea. I just don't understand what you refer to below as (2).
>>> Does petitboot not have the problem because it kexecs the new kernel?
>>
>> Petitboot does not have this problem *if* it runs without SLOF, i.e.
>> directly via -kernel and -initrd and uses OF CI (cut down version, about
>> v3-v4 of my patchset, without block devices and grub lookup). In this
>> case there is one device tree instance, fully synchronized with the
>> machine state.
>>
>> If there is still SLOF and (2) is happening, then petitboot is screwed
>> as any other kernel.
>
> Ok, so "minimal pseudo-OpenFirmware in QEMU" is doable and can get
> everything right;
I am not convinced that ditching drivers is not right; I am moving elf +
mbr + gpt + grub loading to the guest though so 20 bytes blob becomes
FDT-less firmmare, a few kbytes big.
> it's just work to set up PCI and do all that other
> do_driver_stuff(), so you can either do it yourself or use
> Linux+petitboot. Is this correct?
Except using the "just" word, yes, correct ;)
> Also, can a normal distro kernel run via -kernel/-initrd + the minimal
> firmware in QEMU?
Yes.
--
Alexey