[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.2] x86/xsave: also save/restore XCR0 across suspend (ACPI S3)
commit 5b33bae46944a6d0d3811418aca50ad72474bcec Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Nov 15 11:36:12 2013 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Nov 15 11:36:12 2013 +0100 x86/xsave: also save/restore XCR0 across suspend (ACPI S3) Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> master commit: e47a90e6dca491c0ceea6ffa18055e7e32565e8e master date: 2013-10-21 17:26:16 +0200 --- xen/arch/x86/acpi/suspend.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/acpi/suspend.c b/xen/arch/x86/acpi/suspend.c index f2e2133..3f39388 100644 --- a/xen/arch/x86/acpi/suspend.c +++ b/xen/arch/x86/acpi/suspend.c @@ -13,6 +13,7 @@ #include <asm/hvm/hvm.h> #include <asm/hvm/support.h> #include <asm/i387.h> +#include <asm/xstate.h> #include <xen/hypercall.h> #if defined(CONFIG_X86_64) @@ -21,6 +22,7 @@ static unsigned long saved_sysenter_esp, saved_sysenter_eip; static unsigned long saved_fs_base, saved_gs_base, saved_kernel_gs_base; static uint16_t saved_segs[4]; #endif +static uint64_t saved_xcr0; void save_rest_processor_state(void) { @@ -41,6 +43,8 @@ void save_rest_processor_state(void) rdmsrl(MSR_IA32_SYSENTER_EIP, saved_sysenter_eip); } #endif + if ( cpu_has_xsave ) + saved_xcr0 = get_xcr0(); } @@ -89,6 +93,9 @@ void restore_rest_processor_state(void) } #endif + if ( cpu_has_xsave && !set_xcr0(saved_xcr0) ) + BUG(); + /* Maybe load the debug registers. */ BUG_ON(is_hvm_vcpu(curr)); if ( !is_idle_vcpu(curr) && curr->arch.debugreg[7] ) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.2 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |