aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 15:26:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 15:26:54 -0500
commit224394ad75711042c6d362c9dbc9874b476edbc0 (patch)
tree69cff48bc367ca2f035685d16441b1fa51a53aee
parentae664dba2724e59ddd66291b895f7370e28b9a7a (diff)
parent9d328a948f38ec240fc6d05db2c146e23ccd9b8b (diff)
Merge tag 'stable/for-linus-3.8-rc0-bugfix-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull Xen bugfixes from Konrad Rzeszutek Wilk: "Two fixes. One of them is caused by the recent change introduced by the 'x86-bsp-hotplug-for-linus' tip tree that inhibited bootup (old function does not do what it used to do). The other one is just a vanilla bug. - Fix to bootup regression introduced by 'x86-bsp-hotplug-for-linus' tip branch. - Fix to vcpu hotplug code." * tag 'stable/for-linus-3.8-rc0-bugfix-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/vcpu: Fix vcpu restore path. xen: Add EVTCHNOP_reset in Xen interface header files. xen/smp: Use smp_store_boot_cpu_info() to store cpu info for BSP during boot time.
-rw-r--r--arch/x86/xen/enlighten.c7
-rw-r--r--arch/x86/xen/smp.c2
-rw-r--r--include/xen/interface/event_channel.h13
3 files changed, 18 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 3aeaa933b527..138e5667409a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -193,10 +193,11 @@ void xen_vcpu_restore(void)
193{ 193{
194 int cpu; 194 int cpu;
195 195
196 for_each_online_cpu(cpu) { 196 for_each_possible_cpu(cpu) {
197 bool other_cpu = (cpu != smp_processor_id()); 197 bool other_cpu = (cpu != smp_processor_id());
198 bool is_up = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL);
198 199
199 if (other_cpu && 200 if (other_cpu && is_up &&
200 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) 201 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
201 BUG(); 202 BUG();
202 203
@@ -205,7 +206,7 @@ void xen_vcpu_restore(void)
205 if (have_vcpu_info_placement) 206 if (have_vcpu_info_placement)
206 xen_vcpu_setup(cpu); 207 xen_vcpu_setup(cpu);
207 208
208 if (other_cpu && 209 if (other_cpu && is_up &&
209 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) 210 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
210 BUG(); 211 BUG();
211 } 212 }
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 353c50f18702..4f7d2599b484 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -254,7 +254,7 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
254 } 254 }
255 xen_init_lock_cpu(0); 255 xen_init_lock_cpu(0);
256 256
257 smp_store_cpu_info(0); 257 smp_store_boot_cpu_info();
258 cpu_data(0).x86_max_cores = 1; 258 cpu_data(0).x86_max_cores = 1;
259 259
260 for_each_possible_cpu(i) { 260 for_each_possible_cpu(i) {
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h
index 2090881c3650..f4942921e202 100644
--- a/include/xen/interface/event_channel.h
+++ b/include/xen/interface/event_channel.h
@@ -177,6 +177,19 @@ struct evtchn_unmask {
177 evtchn_port_t port; 177 evtchn_port_t port;
178}; 178};
179 179
180/*
181 * EVTCHNOP_reset: Close all event channels associated with specified domain.
182 * NOTES:
183 * 1. <dom> may be specified as DOMID_SELF.
184 * 2. Only a sufficiently-privileged domain may specify other than DOMID_SELF.
185 */
186#define EVTCHNOP_reset 10
187struct evtchn_reset {
188 /* IN parameters. */
189 domid_t dom;
190};
191typedef struct evtchn_reset evtchn_reset_t;
192
180struct evtchn_op { 193struct evtchn_op {
181 uint32_t cmd; /* EVTCHNOP_* */ 194 uint32_t cmd; /* EVTCHNOP_* */
182 union { 195 union {