Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:Maintenance:114
xen.openSUSE_Evergreen_11.4
22462-x86-xsave-init-common.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 22462-x86-xsave-init-common.patch of Package xen.openSUSE_Evergreen_11.4
References: bnc#675817 # HG changeset patch # User Keir Fraser <keir@xen.org> # Date 1291746398 0 # Node ID 98eb4a334b7723c3e515038feaddbd01cec45a3a # Parent 70501ee741a6dccd940c1cb4481650cdc1afdcf3 amd xsave: Move xsave initialization code to a common place This patch moves xsave/xrstor code to CPU common file. First of all, it prepares xsave/xrstor support for AMD CPUs. Secondly, Xen would crash on __context_switch() without this patch on xsave-capable AMD CPUs. The crash was due to cpu_has_xsave reports true in domain.c while xsave space wasn't initialized. Signed-off-by: Wei Huang <wei.huang2@amd.com> Index: xen-4.0.3-testing/xen/arch/x86/cpu/common.c =================================================================== --- xen-4.0.3-testing.orig/xen/arch/x86/cpu/common.c +++ xen-4.0.3-testing/xen/arch/x86/cpu/common.c @@ -22,6 +22,8 @@ static int cachesize_override __cpuinitd static int disable_x86_fxsr __cpuinitdata; static int disable_x86_serial_nr __cpuinitdata; +static int use_xsave; +boolean_param("xsave", use_xsave); unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u; integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); unsigned int __devinitdata opt_cpuid_mask_edx = ~0u; @@ -400,6 +402,13 @@ void __cpuinit identify_cpu(struct cpuin if (this_cpu->c_init) this_cpu->c_init(c); + /* Initialize xsave/xrstor features */ + if ( !use_xsave ) + clear_bit(X86_FEATURE_XSAVE, boot_cpu_data.x86_capability); + + if ( cpu_has_xsave ) + xsave_init(); + /* Disable the PN if appropriate */ squash_the_stupid_serial_number(c); Index: xen-4.0.3-testing/xen/arch/x86/cpu/intel.c =================================================================== --- xen-4.0.3-testing.orig/xen/arch/x86/cpu/intel.c +++ xen-4.0.3-testing/xen/arch/x86/cpu/intel.c @@ -20,9 +20,6 @@ extern int trap_init_f00f_bug(void); -static int use_xsave; -boolean_param("xsave", use_xsave); - #ifdef CONFIG_X86_INTEL_USERCOPY /* * Alignment at which movsl is preferred for bulk memory copies. @@ -256,12 +253,6 @@ static void __devinit init_intel(struct set_bit(X86_FEATURE_ARAT, c->x86_capability); start_vmx(); - - if ( !use_xsave ) - clear_bit(X86_FEATURE_XSAVE, boot_cpu_data.x86_capability); - - if ( cpu_has_xsave ) - xsave_init(); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor