FPU LWP 3/8: clean up FPU context save function
PATCH 1/1 FPU LWP 3/8: clean up FPU context save function
FPU: clean up FPU context save function
This patch cleans up context save function. It renames the save function to vcpu_save_fpu() because existing function name is confusion. It also extracts FPU context save code (fsave, fxsave, xsave) into separate functions. vcpu_save_fpu() will call corresponding sub-function depending on CPU's capability.
# HG changeset patch
# User Wei Huang <[email protected]>
# Date 1304448193 18000
# Node ID 0d71902c5b8fb8e6deadccf7ef7c39e05105267a # Parent cf78dad029ac3a8a9c0bf7300b275da09a94b48c
FPU: clean up FPU context save function
This patch cleans up context save function. It renames the save function to vcpu_save_fpu() because existing function name is confusion. It also extracts FPU context save code (fsave, fxsave, xsave) into seperate functions. vcpu_save_fpu() will call corresponding sub-function depending on CPU's capability.
xen/arch/x86/acpi/suspend.c +1 -1
@@ -24,7 +24,7 @@void save_rest_processor_state (void ) { -save_init_fpu (current); +vcpu_save_fpu (current);#if defined(CONFIG_X86_64 ) asm volatile (
xen/arch/x86/domain.c +1 -1
@@ -1560,7 +1560,7 @@if ( !is_idle_vcpu (p) ) {memcpy (&p->arch.user_regs, stack_regs,CTXT_SWITCH_STACK_BYTES ); -save_init_fpu (p); +vcpu_save_fpu (p); p->arch.ctxt_switch_from (p); }
xen/arch/x86/i387.c +88 -72
174 lines not on this page · raw message
xen/include/asm-x86/i387.h +1 -1
@@ -15,7 +15,7 @@#include <xen/percpu.h> void setup_fpu (struct vcpu *v); -void save_init_fpu (struct vcpu *v); +void vcpu_save_fpu (struct vcpu *v);int vcpu_init_fpu (struct vcpu *v);void vcpu_destroy_fpu (struct vcpu *v);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel