mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
bb19cc0cdd43619ccf830e1e608f79e46f8ddf86
In https://bugzilla.redhat.com/show_bug.cgi?id=2082806 we've been tracking an insidious qemu bug which intermittently prevents the libguestfs appliance from starting. The symptoms are that SeaBIOS starts and displays its messages, but the kernel isn't reached. We found that the kernel does in fact start, but when it tries to set up page tables and jump to protected mode it gets a triple fault which causes the emulated CPU in qemu to reset (qemu exits). This seems to only affect TCG (not KVM). Yesterday I found that this is caused by using -cpu max which enables the "la57" feature (5-level page tables[0]), and that we can make the problem go away using -cpu max,la57=off. Note that I still don't fully understand the qemu bug, so this is only a workaround. I chose to disable 5-level page tables for both TCG and KVM, partly to make the patch simpler, and partly because I guess it's not a feature (ie. 57 bit linear addresses) that is useful for the libguestfs appliance case, where we have limited physical memory and no need to run any programs with huge address spaces. I tested this by running both the direct & libvirt paths overnight. I expect that this patch will fail with old qemu/libvirt which doesn't understand the "la57" feature, but this is only intended as a temporary workaround. [0] Article about 5-level page tables as background: https://lwn.net/Articles/717293/ Thanks: Laszlo Ersek Fixes: https://answers.launchpad.net/ubuntu/+source/libguestfs/+question/701625 [RHEL 8.7: Patch is not upstream. This is the initial patch as posted to the mailing list here: https://listman.redhat.com/archives/libguestfs/2022-May/028853.html]
…
…
…
…
Libguestfs is tools and a library for accessing and modifying guest disk images. For more information see the home page: http://libguestfs.org/ For discussion, development, patches, etc. please use the mailing list: http://www.redhat.com/mailman/listinfo/libguestfs To find out how to build libguestfs from source, read: docs/guestfs-building.pod http://libguestfs.org/guestfs-building.1.html man docs/guestfs-building.1 Copyright (C) 2009-2020 Red Hat Inc. The library is distributed under the LGPLv2+. The programs are distributed under the GPLv2+. Please see the files COPYING and COPYING.LIB for full license information. The examples are under a very liberal license.
Description
Languages
C
42.7%
OCaml
35.5%
Shell
7.1%
Makefile
4%
Perl
2.6%
Other
8%