diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-05-18 21:04:01 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-05-18 21:04:01 +0000 |
commit | dcc772f1c332e526018dce7b652fa4002669cc1d (patch) | |
tree | e24a79221e2cd9e1ed11be25b4d0597af35ca149 /xenolinux-2.4.26-sparse | |
parent | 9083a541fd10e818db2ca8766ec2fda6183b5ca6 (diff) | |
download | xen-dcc772f1c332e526018dce7b652fa4002669cc1d.tar.gz xen-dcc772f1c332e526018dce7b652fa4002669cc1d.tar.bz2 xen-dcc772f1c332e526018dce7b652fa4002669cc1d.zip |
bitkeeper revision 1.908 (40aa7a41_qzAxT0SBKFNAXKT6FF62g)
live migrate now works on SMP
Diffstat (limited to 'xenolinux-2.4.26-sparse')
-rw-r--r-- | xenolinux-2.4.26-sparse/arch/xen/drivers/network/network.c | 4 | ||||
-rw-r--r-- | xenolinux-2.4.26-sparse/arch/xen/kernel/setup.c | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/xenolinux-2.4.26-sparse/arch/xen/drivers/network/network.c b/xenolinux-2.4.26-sparse/arch/xen/drivers/network/network.c index a56783932f..fbe5c4ecf6 100644 --- a/xenolinux-2.4.26-sparse/arch/xen/drivers/network/network.c +++ b/xenolinux-2.4.26-sparse/arch/xen/drivers/network/network.c @@ -366,6 +366,10 @@ static inline void _network_interrupt(struct net_device *dev) skb = np->rx_skbs[rx->id]; ADD_ID_TO_FREELIST(np->rx_skbs, rx->id); +/* XXXXX this is unsafe for live migrate -- if we do a scan be fore this +point we won't transmit the right mfn! We have to fix this up in +xc_linux_save */ + phys_to_machine_mapping[virt_to_phys(skb->head) >> PAGE_SHIFT] = (*(unsigned long *)get_ppte(skb->head)) >> PAGE_SHIFT; diff --git a/xenolinux-2.4.26-sparse/arch/xen/kernel/setup.c b/xenolinux-2.4.26-sparse/arch/xen/kernel/setup.c index b06c6c26b0..1d1306df2b 100644 --- a/xenolinux-2.4.26-sparse/arch/xen/kernel/setup.c +++ b/xenolinux-2.4.26-sparse/arch/xen/kernel/setup.c @@ -62,6 +62,9 @@ unsigned long *phys_to_machine_mapping; multicall_entry_t multicall_list[8]; int nr_multicall_ents = 0; +/* used so we treat multiple stop requests as a single one */ +int suspending = 0; + /* * Machine setup.. */ @@ -1204,6 +1207,8 @@ static void stop_task(void *unused) HYPERVISOR_stop(virt_to_machine(suspend_record) >> PAGE_SHIFT); + suspending = 0; + memcpy(&start_info, &suspend_record->resume_info, sizeof(start_info)); set_fixmap(FIX_SHARED_INFO, start_info.shared_info); @@ -1261,8 +1266,14 @@ static int stop_irq; static void stop_interrupt(int irq, void *unused, struct pt_regs *regs) { - stop_tq.routine = stop_task; - schedule_task(&stop_tq); + if (!suspending) + { + suspending = 1; + stop_tq.routine = stop_task; + schedule_task(&stop_tq); + } + else + printk(KERN_ALERT"Ignore queued stop request\n"); } static int __init setup_stop_event(void) |