CPUMR0A.asm revision 409950536f73e7c9a387f7d548122ae6bffae950
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; CPUM - Guest Context Assembly Routines.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; Copyright (C) 2006-2007 Sun Microsystems, Inc.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; This file is part of VirtualBox Open Source Edition (OSE), as
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; available from http://www.virtualbox.org. This file is free software;
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; you can redistribute it and/or modify it under the terms of the GNU
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; General Public License (GPL) as published by the Free Software
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; Foundation, in version 2 as it comes in the "COPYING" file of the
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; Clara, CA 95054 USA or visit http://www.sun.com if you need
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster; additional information or have any questions.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster;*******************************************************************************
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster;* Header Files *
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster;*******************************************************************************
f781d802a8636144751a19912978388cb49b5360Rich Riley%ifdef IN_RING3
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster %error "The jump table doesn't link on leopard."
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster;*******************************************************************************
f781d802a8636144751a19912978388cb49b5360Rich Riley;* External Symbols *
5deb404a3d276c42ef3e4adef5e584211ab1e8ddjeff.schenk;*******************************************************************************
5deb404a3d276c42ef3e4adef5e584211ab1e8ddjeff.schenk%ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
5deb404a3d276c42ef3e4adef5e584211ab1e8ddjeff.schenkextern NAME(SUPR0AbsIs64bit)
5deb404a3d276c42ef3e4adef5e584211ab1e8ddjeff.schenkextern NAME(SUPR0Abs64bitKernelCS)
; Store the SUPR0AbsIs64bit absolute value here so we can cmp/test without
; Restores the host's FPU/XMM state
test dword [xDX + CPUMCPU.fUseFlags], CPUM_USED_FPU
fxsave [xDX + CPUMCPU.Guest.fpu]
fxrstor [xDX + CPUMCPU.Host.fpu]
and dword [xDX + CPUMCPU.fUseFlags], ~CPUM_USED_FPU
fxsave [rdx + CPUMCPU.Guest.fpu]
fxrstor [rdx + CPUMCPU.Host.fpu]
; Sets the host's FPU/XMM state
test dword [xDX + CPUMCPU.fUseFlags], CPUM_USED_FPU
fxrstor [xDX + CPUMCPU.Host.fpu]
and dword [xDX + CPUMCPU.fUseFlags], ~CPUM_USED_FPU
fxrstor [rdx + CPUMCPU.Host.fpu]
; Restores the guest's FPU/XMM state
fxrstor [xDX + CPUMCTX.fpu]
fxrstor [rdx + CPUMCTX.fpu]
; Restores the guest's FPU/XMM state
fxsave [xDX + CPUMCTX.fpu]
fxsave [rdx + CPUMCTX.fpu]
test qword [xDX + CPUMCTX.msrEFER], MSR_K6_EFER_LMA
test qword [rdx + CPUMCTX.msrEFER], MSR_K6_EFER_LMA
test qword [xDX + CPUMCTX.msrEFER], MSR_K6_EFER_LMA
test qword [rdx + CPUMCTX.msrEFER], MSR_K6_EFER_LMA