diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/transitions/librm.S | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/arch/x86/transitions/librm.S b/src/arch/x86/transitions/librm.S index e91ede37..c31daad8 100644 --- a/src/arch/x86/transitions/librm.S +++ b/src/arch/x86/transitions/librm.S @@ -7,6 +7,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ) +/* Drag in general configuration */ +#include <config/general.h> + /* Drag in local definitions */ #include "librm.h" @@ -207,7 +210,9 @@ VC_TMP_CR3: .space 4 VC_TMP_CR4: .space 4 VC_TMP_EMER: .space 8 .endif +#ifdef TIVOLI_VMM_WORKAROUND VC_TMP_FXSAVE: .space 512 +#endif VC_TMP_END: .previous @@ -1000,11 +1005,12 @@ virt_call: /* Claim ownership of temporary static buffer */ cli + movw %cs:rm_ds, %ds +#ifdef TIVOLI_VMM_WORKAROUND /* Preserve FPU, MMX and SSE state in temporary static buffer */ - movw %cs:rm_ds, %ds fxsave ( rm_tmpbuf + VC_TMP_FXSAVE ) - +#endif /* Preserve GDT and IDT in temporary static buffer */ sidt ( rm_tmpbuf + VC_TMP_IDT ) sgdt ( rm_tmpbuf + VC_TMP_GDT ) @@ -1070,9 +1076,11 @@ vc_rmode: movl $MSR_EFER, %ecx wrmsr .endif + +#ifdef TIVOLI_VMM_WORKAROUND /* Restore FPU, MMX and SSE state from temporary static buffer */ fxrstor ( rm_tmpbuf + VC_TMP_FXSAVE ) - +#endif /* Restore registers and flags and return */ popl %eax /* skip %cs and %ss */ popw %ds |