FPU LWP 4/8: clean up FPU context restore function
PATCH 1/1 FPU LWP 4/8: clean up FPU context restore function
FPU: clean up FPU context restore function
This patch cleans up context restore function. It renames the function name to vcpu_restore_fpu(). It also extracts FPU restore code (frstor, fxrstor, xrstor) out into seperate functions. vcpu_restor_fpu() will dispatch to these functions depending on CPU's capability.
# HG changeset patch
# User Wei Huang <[email protected]>
# Date 1304448326 18000
# Node ID 63208cfe3c558cebc5149fc569702785f6d8e73b # Parent 0d71902c5b8fb8e6deadccf7ef7c39e05105267a
FPU: clean up FPU context restore function
This patch cleans up context restore function. It renames the function name to vcpu_restore_fpu(). It also extracts FPU restore code (frstor, fxrstor, xrstor) out into seperate functions. vcpu_restor_fpu() will dispatch to these functions depending on CPU's capability.
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -348,7 +348,7 @@ {struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb; -setup_fpu (v); +vcpu_restore_fpu (v);vmcb_set_exception_intercepts ( vmcb,vmcb_get_exception_intercepts (vmcb) & ~(1U << TRAP_no_device)); }
xen/arch/x86/hvm/vmx/vmx.c +1 -1
@@ -612,7 +612,7 @@static void vmx_fpu_enter (struct vcpu *v) { -setup_fpu (v); +vcpu_restore_fpu (v); v->arch.hvm_vmx.exception_bitmap &= ~(1u << TRAP_no_device);vmx_update_exception_bitmap (v); v->arch.hvm_vmx.host_cr0 &= ~X86_CR0_TS ;
xen/arch/x86/i387.c +85 -74
188 lines not on this page · raw message
xen/arch/x86/traps.c +1 -1
@@ -3198,7 +3198,7 @@BUG_ON (!guest_mode (regs)); -setup_fpu (curr); +vcpu_restore_fpu (curr);if ( curr->arch.pv_vcpu.ctrlreg[0 ] &X86_CR0_TS ) {
xen/include/asm-x86/i387.h +1 -1
@@ -14,7 +14,7 @@#include <xen/types.h> #include <xen/percpu.h> -void setup_fpu (struct vcpu *v); +void vcpu_restore_fpu (struct vcpu *v);void vcpu_save_fpu (struct vcpu *v);int vcpu_init_fpu (struct vcpu *v);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel