diff options
Diffstat (limited to 'arch/x86/kernel/paravirt.c')
-rw-r--r-- | arch/x86/kernel/paravirt.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 17fff18a1031..8bfb335f74bb 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -263,6 +263,18 @@ void paravirt_leave_lazy_mmu(void) | |||
263 | leave_lazy(PARAVIRT_LAZY_MMU); | 263 | leave_lazy(PARAVIRT_LAZY_MMU); |
264 | } | 264 | } |
265 | 265 | ||
266 | void paravirt_flush_lazy_mmu(void) | ||
267 | { | ||
268 | preempt_disable(); | ||
269 | |||
270 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) { | ||
271 | arch_leave_lazy_mmu_mode(); | ||
272 | arch_enter_lazy_mmu_mode(); | ||
273 | } | ||
274 | |||
275 | preempt_enable(); | ||
276 | } | ||
277 | |||
266 | void paravirt_start_context_switch(struct task_struct *prev) | 278 | void paravirt_start_context_switch(struct task_struct *prev) |
267 | { | 279 | { |
268 | BUG_ON(preemptible()); | 280 | BUG_ON(preemptible()); |
@@ -292,18 +304,6 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) | |||
292 | return this_cpu_read(paravirt_lazy_mode); | 304 | return this_cpu_read(paravirt_lazy_mode); |
293 | } | 305 | } |
294 | 306 | ||
295 | void arch_flush_lazy_mmu_mode(void) | ||
296 | { | ||
297 | preempt_disable(); | ||
298 | |||
299 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) { | ||
300 | arch_leave_lazy_mmu_mode(); | ||
301 | arch_enter_lazy_mmu_mode(); | ||
302 | } | ||
303 | |||
304 | preempt_enable(); | ||
305 | } | ||
306 | |||
307 | struct pv_info pv_info = { | 307 | struct pv_info pv_info = { |
308 | .name = "bare hardware", | 308 | .name = "bare hardware", |
309 | .paravirt_enabled = 0, | 309 | .paravirt_enabled = 0, |
@@ -475,6 +475,7 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
475 | .lazy_mode = { | 475 | .lazy_mode = { |
476 | .enter = paravirt_nop, | 476 | .enter = paravirt_nop, |
477 | .leave = paravirt_nop, | 477 | .leave = paravirt_nop, |
478 | .flush = paravirt_nop, | ||
478 | }, | 479 | }, |
479 | 480 | ||
480 | .set_fixmap = native_set_fixmap, | 481 | .set_fixmap = native_set_fixmap, |