On 10/27/16 08:27, Ján ONDREJ (SAL) wrote: > Hello, > > I have troubles with this FXSAVE/FXRSTOR not only on qemu/kvm, > but with some older hardware too (HP server). > > Maybe this tivoli workaround should be disabled for all and enabled > only for tivoli.
Hmmm. QEMU has a named configuration, and "bundling iPXE for QEMU" is a regular activity that the QEMU developer community does. I don't think "iPXE for Tivoli" is a similarly well-defined environment or use case, so a build-time config for that seems unlikely. If the FXSAVE/FXRSTOR stuff breaks on real hardware as well, then I'm afraid the original analysis of FXSAVE/FXRSTOR availability, in commit 71560d185475, was inexact: > The use of "fxsave" and "fxrstor" introduces an implicit assumption > that the CPU supports SSE instructions (even though we make no > assumption about whether or not SSE is currently enabled). SSE was > introduced in 1999 with the Pentium III (and added by AMD in 2001), > and is an architectural requirement for x86_64. Experimentation with > current versions of gcc suggest that it may generate SSE instructions > even when using "-m32", unless an explicit "-march=i386" or "-mno-sse" > is used to inhibit this. It therefore seems reasonable to assume that > SSE will be supported on any hardware that might realistically be used > with new iPXE builds. If this assumption is unsafe after all, then I bet Michael will want to make FXSAVE/FXRSTOR dependent on dynamic feature detection (CPUID or similar -- maybe even detect the Tivoli VMM somehow, at runtime, like you said). Thanks Laszlo > On Thu, Oct 27, 2016 at 12:13:51AM +0200, Laszlo Ersek wrote: >> This prevents KVM guests from crashing that run iPXE on host CPUs without >> "unrestricted_guest" support. >> >> Once KVM gets the FXSAVE / FXRSTOR emulation feature (*), and the feature >> becomes widely available to users, we can back out this change from iPXE. >> >> (*) Already in progress by Radim: >> >> [PATCH 0/2] KVM: x86: emulate fxsave and fxrstor >> >> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1258895.html >> https://www.spinics.net/lists/kernel/msg2370327.html >> >> Cc: Bandan Das <b...@redhat.com> >> Cc: Gerd Hoffmann <kra...@redhat.com> >> Cc: Greg <rollenwi...@yahoo.com> >> Cc: Michael Brown <mc...@ipxe.org> >> Cc: Michael Prokop <launch...@michael-prokop.at> >> Cc: Paolo Bonzini <pbonz...@redhat.com> >> Cc: Peter Pickford <a...@netremedies.ca> >> Cc: Radim Krčmář <rkrc...@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 <ler...@redhat.com> >> --- >> src/config/qemu/general.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/src/config/qemu/general.h b/src/config/qemu/general.h >> index 30f60d3f704a..a084497359fe 100644 >> --- a/src/config/qemu/general.h >> +++ b/src/config/qemu/general.h >> @@ -8,3 +8,8 @@ >> >> /* Work around missing EFI_PXE_BASE_CODE_PROTOCOL */ >> #define EFI_DOWNGRADE_UX >> + >> +/* The Tivoli VMM workaround causes a KVM emulation failure on hosts >> + * without unrestricted_guest support >> + */ >> +#undef TIVOLI_VMM_WORKAROUND >> -- >> 2.9.2 >> >> _______________________________________________ >> ipxe-devel mailing list >> ipxe-devel@lists.ipxe.org >> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel _______________________________________________ ipxe-devel mailing list ipxe-devel@lists.ipxe.org https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel