summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorLaszlo Ersek2016-10-27 00:13:50 +0200
committerMichael Brown2016-11-08 18:37:59 +0100
commitdd9a14de35d2c4e308170ad2b51722d448d04e76 (patch)
tree60b29f51e53e7e764975540ce044e096cc747e6d /src/config
parent[bzimage] Fix page alignment of initrd images (diff)
downloadipxe-dd9a14de35d2c4e308170ad2b51722d448d04e76.tar.gz
ipxe-dd9a14de35d2c4e308170ad2b51722d448d04e76.tar.xz
ipxe-dd9a14de35d2c4e308170ad2b51722d448d04e76.zip
[librm] Conditionalize the workaround for the Tivoli VMM's SSE garbling
Commit 71560d1 ("[librm] Preserve FPU, MMX and SSE state across calls to virt_call()") added FXSAVE and FXRSTOR instructions to iPXE. In KVM virtual machines, these instructions execute fine as long as the host CPU supports the "unrestricted_guest" feature (that is, it can virtualize big real mode natively). On older host CPUs however, KVM has to emulate big real mode, and it currently doesn't implement FXSAVE emulation. Upstream QEMU rebuilt iPXE at commit 0418631 ("[thunderx] Fix compilation with older versions of gcc") which is a descendant of commit 71560d1 (see above). This was done in QEMU commit ffdc5a2 ("ipxe: update submodule from 4e03af8ec to 041863191"). The resultant binaries were bundled with the QEMU v2.7.0 release; see QEMU commit c52125a ("ipxe: update prebuilt binaries"). This distributed the iPXE workaround for the Tivoli VMM bug to a number of KVM users with old host CPUs, causing KVM emulation failures (guest crashes) for them while netbooting. Make the FXSAVE and FXRSTOR instructions conditional on a new feature test macro called TIVOLI_VMM_WORKAROUND. Define the macro by default. There is prior art for an assembly file including config/general.h: see arch/x86/prefix/romprefix.S. Also, TIVOLI_VMM_WORKAROUND seems to be a good fit for the "Obscure configuration options" section in config/general.h. Cc: Bandan Das <bsd@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Greg <rollenwiese@yahoo.com> Cc: Michael Brown <mcb30@ipxe.org> Cc: Michael Prokop <launchpad@michael-prokop.at> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Pickford <arch@netremedies.ca> Cc: Radim Krčmář <rkrcmar@redhat.com> Ref: https://bugs.archlinux.org/task/50778 Ref: https://bugs.launchpad.net/qemu/+bug/1623276 Ref: https://bugzilla.proxmox.com/show_bug.cgi?id=1182 Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1356762 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/general.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/general.h b/src/config/general.h
index d2bbeb06..be0845f6 100644
--- a/src/config/general.h
+++ b/src/config/general.h
@@ -190,6 +190,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#undef GDBUDP /* Remote GDB debugging over UDP
* (both may be set) */
//#define EFI_DOWNGRADE_UX /* Downgrade UEFI user experience */
+#define TIVOLI_VMM_WORKAROUND /* Work around the Tivoli VMM's garbling of SSE
+ * registers when iPXE traps to it due to
+ * privileged instructions */
#include <config/named.h>
#include NAMED_CONFIG(general.h)