On 21.02.2017 11:23, Christian Borntraeger wrote:
On 02/20/2017 04:33 PM, Thomas Huth wrote:
On 20.02.2017 15:19, Cornelia Huck wrote:
From: Farhan Ali <address@hidden>
The current QEMU ROM infrastructure rejects late loading of ROMs.
And ELFs are currently loaded as ROM, this prevents delayed loading
of ELFs. So when loading ELF, allow the user to specify if ELF should
be loaded as ROM or not.
If an ELF is not loaded as ROM, then they are not restored on a
guest reboot/reset and so its upto the user to handle the reloading.
Could you maybe also explain here why you need such a delayed ELF
loading? Why can't you load the s390-netboot.img at the same time as
s390-ccw.img?
Please read the cover letter for some details how to build such a netrom.
Sure, understood, but I still did not see an explanation why this can't
be loaded as "ROM", too / why it needs to be loaded "delayed"? Does the
image data need to be writable in memory? Or is the information not
available yet at that point in time, whether the user wants to do a
network boot or not? Don't get me wrong, I'm basically fine with this
patch, I'm just missing some explanation *why* you have to do it this way.
Long term we certainly want to have a look at implementing something in
the ccw bios, but this (tcp stack, virtio net, etc) will take some (a lot?)
more time.
Just an idea: There's a complete TFTP-boot-over-virtio-net stack in
SLOF, written by IBM ... maybe you could use that for s390x, too?
This patch (1) has another advantage.
Right now we load the ccw bios all the time, even for -kernel xxx boot,
to allow the guest user to use chreipl to reboot from a disk. With this
in place we can rework our ccw bios loader to load the ccw bios lazily
as well.
But this "RAM"-loader here has still the problem that the images are not
restored during reboot/reset, right? ... so before you're going to
implement that as well, let me ask another question: Did you already
have a look at the generic loader device? I think that might already
provide what you're trying to implement here, so your problem could
maybe be solved with some few lines of creating an instance of that
device instead (see
https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05366.html for
an example how to use that device).
Thomas