diff options
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 0a1700a2be9c..eb33aaa8415d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -215,6 +215,7 @@ static __init void xen_init_cpuid_mask(void) | |||
215 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ | 215 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ |
216 | 216 | ||
217 | ax = 1; | 217 | ax = 1; |
218 | cx = 0; | ||
218 | xen_cpuid(&ax, &bx, &cx, &dx); | 219 | xen_cpuid(&ax, &bx, &cx, &dx); |
219 | 220 | ||
220 | /* cpuid claims we support xsave; try enabling it to see what happens */ | 221 | /* cpuid claims we support xsave; try enabling it to see what happens */ |
@@ -974,10 +975,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
974 | 975 | ||
975 | xen_domain_type = XEN_PV_DOMAIN; | 976 | xen_domain_type = XEN_PV_DOMAIN; |
976 | 977 | ||
977 | BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0); | ||
978 | |||
979 | xen_setup_features(); | ||
980 | |||
981 | /* Install Xen paravirt ops */ | 978 | /* Install Xen paravirt ops */ |
982 | pv_info = xen_info; | 979 | pv_info = xen_info; |
983 | pv_init_ops = xen_init_ops; | 980 | pv_init_ops = xen_init_ops; |
@@ -986,8 +983,15 @@ asmlinkage void __init xen_start_kernel(void) | |||
986 | pv_apic_ops = xen_apic_ops; | 983 | pv_apic_ops = xen_apic_ops; |
987 | pv_mmu_ops = xen_mmu_ops; | 984 | pv_mmu_ops = xen_mmu_ops; |
988 | 985 | ||
989 | xen_init_irq_ops(); | 986 | #ifdef CONFIG_X86_64 |
987 | /* | ||
988 | * Setup percpu state. We only need to do this for 64-bit | ||
989 | * because 32-bit already has %fs set properly. | ||
990 | */ | ||
991 | load_percpu_segment(0); | ||
992 | #endif | ||
990 | 993 | ||
994 | xen_init_irq_ops(); | ||
991 | xen_init_cpuid_mask(); | 995 | xen_init_cpuid_mask(); |
992 | 996 | ||
993 | #ifdef CONFIG_X86_LOCAL_APIC | 997 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -997,6 +1001,8 @@ asmlinkage void __init xen_start_kernel(void) | |||
997 | set_xen_basic_apic_ops(); | 1001 | set_xen_basic_apic_ops(); |
998 | #endif | 1002 | #endif |
999 | 1003 | ||
1004 | xen_setup_features(); | ||
1005 | |||
1000 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { | 1006 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { |
1001 | pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; | 1007 | pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; |
1002 | pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; | 1008 | pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; |
@@ -1004,13 +1010,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
1004 | 1010 | ||
1005 | machine_ops = xen_machine_ops; | 1011 | machine_ops = xen_machine_ops; |
1006 | 1012 | ||
1007 | #ifdef CONFIG_X86_64 | ||
1008 | /* | ||
1009 | * Setup percpu state. We only need to do this for 64-bit | ||
1010 | * because 32-bit already has %fs set properly. | ||
1011 | */ | ||
1012 | load_percpu_segment(0); | ||
1013 | #endif | ||
1014 | /* | 1013 | /* |
1015 | * The only reliable way to retain the initial address of the | 1014 | * The only reliable way to retain the initial address of the |
1016 | * percpu gdt_page is to remember it here, so we can go and | 1015 | * percpu gdt_page is to remember it here, so we can go and |
@@ -1061,6 +1060,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
1061 | /* set up basic CPUID stuff */ | 1060 | /* set up basic CPUID stuff */ |
1062 | cpu_detect(&new_cpu_data); | 1061 | cpu_detect(&new_cpu_data); |
1063 | new_cpu_data.hard_math = 1; | 1062 | new_cpu_data.hard_math = 1; |
1063 | new_cpu_data.wp_works_ok = 1; | ||
1064 | new_cpu_data.x86_capability[0] = cpuid_edx(1); | 1064 | new_cpu_data.x86_capability[0] = cpuid_edx(1); |
1065 | #endif | 1065 | #endif |
1066 | 1066 | ||