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.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 235c0f4d3861..7250bef7f49e 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;
@@ -1202,10 +1211,18 @@ asmlinkage void __init xen_start_kernel(void)
1202#else 1211#else
1203 pv_info.kernel_rpl = 0; 1212 pv_info.kernel_rpl = 0;
1204#endif 1213#endif
1205
1206 /* set the limit of our address space */ 1214 /* set the limit of our address space */
1207 xen_reserve_top(); 1215 xen_reserve_top();
1208 1216
1217 /* We used to do this in xen_arch_setup, but that is too late on AMD
1218 * were early_cpu_init (run before ->arch_setup()) calls early_amd_init
1219 * which pokes 0xcf8 port.
1220 */
1221 set_iopl.iopl = 1;
1222 rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
1223 if (rc != 0)
1224 xen_raw_printk("physdev_op failed %d\n", rc);
1225
1209#ifdef CONFIG_X86_32 1226#ifdef CONFIG_X86_32
1210 /* set up basic CPUID stuff */ 1227 /* set up basic CPUID stuff */
1211 cpu_detect(&new_cpu_data); 1228 cpu_detect(&new_cpu_data);