aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /arch/x86/xen/enlighten.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c49
1 files changed, 33 insertions, 16 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index dfbf70e65860..65d8d79b46a8 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -27,7 +27,10 @@
27#include <linux/page-flags.h> 27#include <linux/page-flags.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/console.h> 29#include <linux/console.h>
30#include <linux/pci.h>
31#include <linux/gfp.h>
30 32
33#include <xen/xen.h>
31#include <xen/interface/xen.h> 34#include <xen/interface/xen.h>
32#include <xen/interface/version.h> 35#include <xen/interface/version.h>
33#include <xen/interface/physdev.h> 36#include <xen/interface/physdev.h>
@@ -48,6 +51,7 @@
48#include <asm/traps.h> 51#include <asm/traps.h>
49#include <asm/setup.h> 52#include <asm/setup.h>
50#include <asm/desc.h> 53#include <asm/desc.h>
54#include <asm/pgalloc.h>
51#include <asm/pgtable.h> 55#include <asm/pgtable.h>
52#include <asm/tlbflush.h> 56#include <asm/tlbflush.h>
53#include <asm/reboot.h> 57#include <asm/reboot.h>
@@ -138,24 +142,23 @@ static void xen_vcpu_setup(int cpu)
138 */ 142 */
139void xen_vcpu_restore(void) 143void xen_vcpu_restore(void)
140{ 144{
141 if (have_vcpu_info_placement) { 145 int cpu;
142 int cpu;
143 146
144 for_each_online_cpu(cpu) { 147 for_each_online_cpu(cpu) {
145 bool other_cpu = (cpu != smp_processor_id()); 148 bool other_cpu = (cpu != smp_processor_id());
146 149
147 if (other_cpu && 150 if (other_cpu &&
148 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) 151 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
149 BUG(); 152 BUG();
150 153
151 xen_vcpu_setup(cpu); 154 xen_setup_runstate_info(cpu);
152 155
153 if (other_cpu && 156 if (have_vcpu_info_placement)
154 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) 157 xen_vcpu_setup(cpu);
155 BUG();
156 }
157 158
158 BUG_ON(!have_vcpu_info_placement); 159 if (other_cpu &&
160 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
161 BUG();
159 } 162 }
160} 163}
161 164
@@ -1093,10 +1096,14 @@ asmlinkage void __init xen_start_kernel(void)
1093 1096
1094 __supported_pte_mask |= _PAGE_IOMAP; 1097 __supported_pte_mask |= _PAGE_IOMAP;
1095 1098
1096#ifdef CONFIG_X86_64 1099 /*
1100 * Prevent page tables from being allocated in highmem, even
1101 * if CONFIG_HIGHPTE is enabled.
1102 */
1103 __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
1104
1097 /* Work out if we support NX */ 1105 /* Work out if we support NX */
1098 check_efer(); 1106 x86_configure_nx();
1099#endif
1100 1107
1101 xen_setup_features(); 1108 xen_setup_features();
1102 1109
@@ -1152,9 +1159,13 @@ asmlinkage void __init xen_start_kernel(void)
1152 1159
1153 /* keep using Xen gdt for now; no urgent need to change it */ 1160 /* keep using Xen gdt for now; no urgent need to change it */
1154 1161
1162#ifdef CONFIG_X86_32
1155 pv_info.kernel_rpl = 1; 1163 pv_info.kernel_rpl = 1;
1156 if (xen_feature(XENFEAT_supervisor_mode_kernel)) 1164 if (xen_feature(XENFEAT_supervisor_mode_kernel))
1157 pv_info.kernel_rpl = 0; 1165 pv_info.kernel_rpl = 0;
1166#else
1167 pv_info.kernel_rpl = 0;
1168#endif
1158 1169
1159 /* set the limit of our address space */ 1170 /* set the limit of our address space */
1160 xen_reserve_top(); 1171 xen_reserve_top();
@@ -1178,10 +1189,16 @@ asmlinkage void __init xen_start_kernel(void)
1178 add_preferred_console("xenboot", 0, NULL); 1189 add_preferred_console("xenboot", 0, NULL);
1179 add_preferred_console("tty", 0, NULL); 1190 add_preferred_console("tty", 0, NULL);
1180 add_preferred_console("hvc", 0, NULL); 1191 add_preferred_console("hvc", 0, NULL);
1192 } else {
1193 /* Make sure ACS will be enabled */
1194 pci_request_acs();
1181 } 1195 }
1196
1182 1197
1183 xen_raw_console_write("about to get started...\n"); 1198 xen_raw_console_write("about to get started...\n");
1184 1199
1200 xen_setup_runstate_info(0);
1201
1185 /* Start the world */ 1202 /* Start the world */
1186#ifdef CONFIG_X86_32 1203#ifdef CONFIG_X86_32
1187 i386_start_kernel(); 1204 i386_start_kernel();