diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-02-18 14:18:57 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-03-30 02:36:01 -0400 |
commit | 224101ed69d3fbb486868e0f6e0f9fa37302efb4 (patch) | |
tree | 46830842a99659421eeabee65d299ab4c3b59f28 /arch/x86/lguest | |
parent | b407fc57b815b2016186220baabc76cc8264206e (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/lguest')
-rw-r--r-- | arch/x86/lguest/boot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 41a5562e710e..5287081b3567 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -153,10 +153,10 @@ static void lguest_leave_lazy_mmu_mode(void) | |||
153 | paravirt_leave_lazy_mmu(); | 153 | paravirt_leave_lazy_mmu(); |
154 | } | 154 | } |
155 | 155 | ||
156 | static void lguest_leave_lazy_cpu_mode(void) | 156 | static void lguest_end_context_switch(struct task_struct *next) |
157 | { | 157 | { |
158 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); | 158 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); |
159 | paravirt_leave_lazy_cpu(); | 159 | paravirt_end_context_switch(next); |
160 | } | 160 | } |
161 | 161 | ||
162 | /*G:033 | 162 | /*G:033 |
@@ -1031,8 +1031,8 @@ __init void lguest_init(void) | |||
1031 | pv_cpu_ops.write_gdt_entry = lguest_write_gdt_entry; | 1031 | pv_cpu_ops.write_gdt_entry = lguest_write_gdt_entry; |
1032 | pv_cpu_ops.write_idt_entry = lguest_write_idt_entry; | 1032 | pv_cpu_ops.write_idt_entry = lguest_write_idt_entry; |
1033 | pv_cpu_ops.wbinvd = lguest_wbinvd; | 1033 | pv_cpu_ops.wbinvd = lguest_wbinvd; |
1034 | pv_cpu_ops.lazy_mode.enter = paravirt_enter_lazy_cpu; | 1034 | pv_cpu_ops.start_context_switch = paravirt_start_context_switch; |
1035 | pv_cpu_ops.lazy_mode.leave = lguest_leave_lazy_cpu_mode; | 1035 | pv_cpu_ops.end_context_switch = lguest_end_context_switch; |
1036 | 1036 | ||
1037 | /* pagetable management */ | 1037 | /* pagetable management */ |
1038 | pv_mmu_ops.write_cr3 = lguest_write_cr3; | 1038 | pv_mmu_ops.write_cr3 = lguest_write_cr3; |