Skip to content

Commit 224394a

Browse files
committed
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.
2 parents ae664db + 9d328a9 commit 224394a

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

arch/x86/xen/enlighten.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ void xen_vcpu_restore(void)
193193
{
194194
int cpu;
195195

196-
for_each_online_cpu(cpu) {
196+
for_each_possible_cpu(cpu) {
197197
bool other_cpu = (cpu != smp_processor_id());
198+
bool is_up = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL);
198199

199-
if (other_cpu &&
200+
if (other_cpu && is_up &&
200201
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
201202
BUG();
202203

@@ -205,7 +206,7 @@ void xen_vcpu_restore(void)
205206
if (have_vcpu_info_placement)
206207
xen_vcpu_setup(cpu);
207208

208-
if (other_cpu &&
209+
if (other_cpu && is_up &&
209210
HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
210211
BUG();
211212
}

arch/x86/xen/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
254254
}
255255
xen_init_lock_cpu(0);
256256

257-
smp_store_cpu_info(0);
257+
smp_store_boot_cpu_info();
258258
cpu_data(0).x86_max_cores = 1;
259259

260260
for_each_possible_cpu(i) {

include/xen/interface/event_channel.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,19 @@ struct evtchn_unmask {
177177
evtchn_port_t port;
178178
};
179179

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
187+
struct evtchn_reset {
188+
/* IN parameters. */
189+
domid_t dom;
190+
};
191+
typedef struct evtchn_reset evtchn_reset_t;
192+
180193
struct evtchn_op {
181194
uint32_t cmd; /* EVTCHNOP_* */
182195
union {

0 commit comments

Comments
 (0)