1
0

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>
Este cometimento está contido em:
Jeremy Fitzhardinge
2009-02-18 11:18:57 -08:00
ascendente b407fc57b8
cometimento 224101ed69
11 ficheiros modificados com 37 adições e 36 eliminações

Ver ficheiro

@@ -203,10 +203,10 @@ static unsigned long xen_get_debugreg(int reg)
return HYPERVISOR_get_debugreg(reg);
}
static void xen_leave_lazy_cpu(void)
static void xen_end_context_switch(struct task_struct *next)
{
xen_mc_flush();
paravirt_leave_lazy_cpu();
paravirt_end_context_switch(next);
}
static unsigned long xen_store_tr(void)
@@ -817,10 +817,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
/* Xen takes care of %gs when switching to usermode for us */
.swapgs = paravirt_nop,
.lazy_mode = {
.enter = paravirt_enter_lazy_cpu,
.leave = xen_leave_lazy_cpu,
},
.start_context_switch = paravirt_start_context_switch,
.end_context_switch = xen_end_context_switch,
};
static const struct pv_apic_ops xen_apic_ops __initdata = {