On Fri, Dec 30, 2022 at 01:58:39PM -0800, H. Peter Anvin wrote:
See the other thread fork. They have identified the problem already.
Not sure I follow. Is there another thread where somebody worked out why
this 62meg limit was happening?
Note that I sent v2/v3, to fix the original problem in a different way,
and if that looks good to the QEMU maintainers, then we can all be happy
with that. But I *haven't* addressed and still don't fully understand
why the 62meg limit applied to my v1 in the way it does. Did you find a
bug there to fix? If so, please do CC me.
Then build qemu. Run it with `-kernel bzImage`, based on the kernel
built with the .config I attached.
You'll see that the CPU triple faults when hitting this line:
sd = (struct setup_data *)boot_params->hdr.setup_data;
while (sd) {
unsigned long sd_addr = (unsigned long)sd;
kernel_add_identity_map(sd_addr, sd_addr + sizeof(*sd) + sd->len); <----
sd = (struct setup_data *)sd->next;
}
, because it dereferences *sd. This does not happen if the decompressed
size of the kernel is < 62 megs.
So that's the "big and pretty serious" bug that might be worthy of
investigation.