aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 235c0f4d3861..02c710bebf7a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -75,6 +75,11 @@ DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info);
75enum xen_domain_type xen_domain_type = XEN_NATIVE; 75enum xen_domain_type xen_domain_type = XEN_NATIVE;
76EXPORT_SYMBOL_GPL(xen_domain_type); 76EXPORT_SYMBOL_GPL(xen_domain_type);
77 77
78unsigned long *machine_to_phys_mapping = (void *)MACH2PHYS_VIRT_START;
79EXPORT_SYMBOL(machine_to_phys_mapping);
80unsigned int machine_to_phys_order;
81EXPORT_SYMBOL(machine_to_phys_order);
82
78struct start_info *xen_start_info; 83struct start_info *xen_start_info;
79EXPORT_SYMBOL_GPL(xen_start_info); 84EXPORT_SYMBOL_GPL(xen_start_info);
80 85
@@ -1090,6 +1095,8 @@ static void __init xen_setup_stackprotector(void)
1090/* First C function to be called on Xen boot */ 1095/* First C function to be called on Xen boot */
1091asmlinkage void __init xen_start_kernel(void) 1096asmlinkage void __init xen_start_kernel(void)
1092{ 1097{
1098 struct physdev_set_iopl set_iopl;
1099 int rc;
1093 pgd_t *pgd; 1100 pgd_t *pgd;
1094 1101
1095 if (!xen_start_info) 1102 if (!xen_start_info)
@@ -1097,6 +1104,8 @@ asmlinkage void __init xen_start_kernel(void)
1097 1104
1098 xen_domain_type = XEN_PV_DOMAIN; 1105 xen_domain_type = XEN_PV_DOMAIN;
1099 1106
1107 xen_setup_machphys_mapping();
1108
1100 /* Install Xen paravirt ops */ 1109 /* Install Xen paravirt ops */
1101 pv_info = xen_info; 1110 pv_info = xen_info;
1102 pv_init_ops = xen_init_ops; 1111 pv_init_ops = xen_init_ops;
@@ -1191,8 +1200,6 @@ asmlinkage void __init xen_start_kernel(void)
1191 /* Allocate and initialize top and mid mfn levels for p2m structure */ 1200 /* Allocate and initialize top and mid mfn levels for p2m structure */
1192 xen_build_mfn_list_list(); 1201 xen_build_mfn_list_list();
1193 1202
1194 init_mm.pgd = pgd;
1195
1196 /* keep using Xen gdt for now; no urgent need to change it */ 1203 /* keep using Xen gdt for now; no urgent need to change it */
1197 1204
1198#ifdef CONFIG_X86_32 1205#ifdef CONFIG_X86_32
@@ -1202,10 +1209,18 @@ asmlinkage void __init xen_start_kernel(void)
1202#else 1209#else
1203 pv_info.kernel_rpl = 0; 1210 pv_info.kernel_rpl = 0;
1204#endif 1211#endif
1205
1206 /* set the limit of our address space */ 1212 /* set the limit of our address space */
1207 xen_reserve_top(); 1213 xen_reserve_top();
1208 1214
1215 /* We used to do this in xen_arch_setup, but that is too late on AMD
1216 * were early_cpu_init (run before ->arch_setup()) calls early_amd_init
1217 * which pokes 0xcf8 port.
1218 */
1219 set_iopl.iopl = 1;
1220 rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
1221 if (rc != 0)
1222 xen_raw_printk("physdev_op failed %d\n", rc);
1223
1209#ifdef CONFIG_X86_32 1224#ifdef CONFIG_X86_32
1210 /* set up basic CPUID stuff */ 1225 /* set up basic CPUID stuff */
1211 cpu_detect(&new_cpu_data); 1226 cpu_detect(&new_cpu_data);