mirror of
https://github.com/ipxe/ipxe
synced 2026-10-07 15:05:42 +03:00
[librm] Remove conditionalisation of the Tivoli VMM workaround
Commit71560d1("[librm] Preserve FPU, MMX and SSE state across calls to virt_call()") originally introduced the use of "fxsave" and "fxrstor" to work around a bug in the implementation of memcpy() within the IBM Tivoli Provisioning Manager's VMM. This commit assumed (with justification given in the commit message) that SSE support could be assumed to be present on any realistic in-scope CPU, and so these instructions may safely be assumed to be supported. Commitdd9a14d("[librm] Conditionalize the workaround for the Tivoli VMM's SSE garbling") then made this workaround a compile-time conditional, to work around a missing feature in QEMU that caused the use of "fxsave" and "fxrstor" to fail in QEMU VMs on some host CPUs. Commit900f1f9("[librm] Test for FXSAVE/FXRSTOR instruction support") then added a runtime CPUID check for the FXSR feature, to allow the unmodified iPXE binary to be used on older CPUs. Supporting AES hardware acceleration via AES-NI will require setting the CR4.OSFXSR control bit, which in turn must be conditionalised upon the same runtime CPUID check for the FXSR feature. Perform the runtime check unconditionally, and assume that we no longer need the compile-time conditional (i.e. assume either that newer versions of QEMU emulate "fxsave" and "fxrstor" when needed, or that QEMU reports via CPUID that FXSR is not supported if it cannot support those instructions). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -349,12 +349,10 @@ init_librm_rmode:
|
||||
/* Initialise IDT */
|
||||
virtcall init_idt
|
||||
|
||||
#ifdef TIVOLI_VMM_WORKAROUND
|
||||
/* Check for FXSAVE/FXRSTOR */
|
||||
clc
|
||||
virtcall check_fxsr
|
||||
setnc fxsr_supported
|
||||
#endif
|
||||
|
||||
/* Restore registers */
|
||||
popl %edi
|
||||
|
||||
@@ -303,9 +303,6 @@ FILE_SECBOOT ( PERMITTED );
|
||||
//#define GDBSERIAL /* Remote GDB debugging over serial */
|
||||
//#define GDBUDP /* Remote GDB debugging over UDP */
|
||||
//#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 */
|
||||
//#define ERRMSG_80211 /* All 802.11 error descriptions (~3.3kb) */
|
||||
|
||||
#include <config/named.h>
|
||||
|
||||
@@ -8,8 +8,3 @@
|
||||
|
||||
/* 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
|
||||
|
||||
Reference in New Issue
Block a user