aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmi_32.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-02-18 14:18:57 -0500
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-30 02:36:01 -0400
commit224101ed69d3fbb486868e0f6e0f9fa37302efb4 (patch)
tree46830842a99659421eeabee65d299ab4c3b59f28 /arch/x86/kernel/vmi_32.c
parentb407fc57b815b2016186220baabc76cc8264206e (diff)
x86/paravirt: finish change from lazy cpu to context switch start/end
Impact: fix lazy context switch API Pass the previous and next tasks into the context switch start end calls, so that the called functions can properly access the task state (esp in end_context_switch, in which the next task is not yet completely current). Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'arch/x86/kernel/vmi_32.c')
-rw-r--r--arch/x86/kernel/vmi_32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 950929c607d3..55a5d6938e5e 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -467,16 +467,16 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
467} 467}
468#endif 468#endif
469 469
470static void vmi_enter_lazy_cpu(void) 470static void vmi_start_context_switch(struct task_struct *prev)
471{ 471{
472 paravirt_enter_lazy_cpu(); 472 paravirt_start_context_switch(prev);
473 vmi_ops.set_lazy_mode(2); 473 vmi_ops.set_lazy_mode(2);
474} 474}
475 475
476static void vmi_leave_lazy_cpu(void) 476static void vmi_end_context_switch(struct task_struct *next)
477{ 477{
478 vmi_ops.set_lazy_mode(0); 478 vmi_ops.set_lazy_mode(0);
479 paravirt_leave_lazy_cpu(); 479 paravirt_end_context_switch(next);
480} 480}
481 481
482static void vmi_enter_lazy_mmu(void) 482static void vmi_enter_lazy_mmu(void)
@@ -722,9 +722,9 @@ static inline int __init activate_vmi(void)
722 para_fill(pv_cpu_ops.set_iopl_mask, SetIOPLMask); 722 para_fill(pv_cpu_ops.set_iopl_mask, SetIOPLMask);
723 para_fill(pv_cpu_ops.io_delay, IODelay); 723 para_fill(pv_cpu_ops.io_delay, IODelay);
724 724
725 para_wrap(pv_cpu_ops.lazy_mode.enter, vmi_enter_lazy_cpu, 725 para_wrap(pv_cpu_ops.start_context_switch, vmi_start_context_switch,
726 set_lazy_mode, SetLazyMode); 726 set_lazy_mode, SetLazyMode);
727 para_wrap(pv_cpu_ops.lazy_mode.leave, vmi_leave_lazy_cpu, 727 para_wrap(pv_cpu_ops.end_context_switch, vmi_end_context_switch,
728 set_lazy_mode, SetLazyMode); 728 set_lazy_mode, SetLazyMode);
729 729
730 para_wrap(pv_mmu_ops.lazy_mode.enter, vmi_enter_lazy_mmu, 730 para_wrap(pv_mmu_ops.lazy_mode.enter, vmi_enter_lazy_mmu,