diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-04-04 08:30:33 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-05 12:26:14 -0400 |
commit | e08759215b7dcb7111e94f0f96918dd98e86ca6b (patch) | |
tree | a2daa0e5840f68d20230435c5b4ebaf8ad0d438b | |
parent | 8a4032496f41d40d2d0272b887b7f4cbc0ea2186 (diff) |
KVM: Resolve RCU vs. async page fault problem
"Page ready" async PF can kick vcpu out of idle state much like IRQ.
We need to tell RCU about this.
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kernel/kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 694d801bf606..b8ba6e4a27e4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/traps.h> | 38 | #include <asm/traps.h> |
39 | #include <asm/desc.h> | 39 | #include <asm/desc.h> |
40 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
41 | #include <asm/idle.h> | ||
41 | 42 | ||
42 | static int kvmapf = 1; | 43 | static int kvmapf = 1; |
43 | 44 | ||
@@ -253,7 +254,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
253 | kvm_async_pf_task_wait((u32)read_cr2()); | 254 | kvm_async_pf_task_wait((u32)read_cr2()); |
254 | break; | 255 | break; |
255 | case KVM_PV_REASON_PAGE_READY: | 256 | case KVM_PV_REASON_PAGE_READY: |
257 | rcu_irq_enter(); | ||
258 | exit_idle(); | ||
256 | kvm_async_pf_task_wake((u32)read_cr2()); | 259 | kvm_async_pf_task_wake((u32)read_cr2()); |
260 | rcu_irq_exit(); | ||
257 | break; | 261 | break; |
258 | } | 262 | } |
259 | } | 263 | } |