x86/paravirt: flush pending mmu updates on context switch
Impact: allow preemption during lazy mmu updates If we're in lazy mmu mode when context switching, leave lazy mmu mode, but remember the task's state in TIF_LAZY_MMU_UPDATES. When we resume the task, check this flag and re-enter lazy mmu mode if its set. This sets things up for allowing lazy mmu mode while preemptible, though that won't actually be active until the next change. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
This commit is contained in:
@@ -203,10 +203,10 @@ static unsigned long xen_get_debugreg(int reg)
|
||||
return HYPERVISOR_get_debugreg(reg);
|
||||
}
|
||||
|
||||
void xen_leave_lazy(void)
|
||||
static void xen_leave_lazy_cpu(void)
|
||||
{
|
||||
paravirt_leave_lazy(paravirt_get_lazy_mode());
|
||||
xen_mc_flush();
|
||||
paravirt_leave_lazy_cpu();
|
||||
}
|
||||
|
||||
static unsigned long xen_store_tr(void)
|
||||
@@ -819,7 +819,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
|
||||
|
||||
.lazy_mode = {
|
||||
.enter = paravirt_enter_lazy_cpu,
|
||||
.leave = xen_leave_lazy,
|
||||
.leave = xen_leave_lazy_cpu,
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user