Commit e0875921 authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity

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: default avatarSasha Levin <levinsasha928@gmail.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 8a403249
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/idle.h>
static int kvmapf = 1; static int kvmapf = 1;
...@@ -253,7 +254,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code) ...@@ -253,7 +254,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
kvm_async_pf_task_wait((u32)read_cr2()); kvm_async_pf_task_wait((u32)read_cr2());
break; break;
case KVM_PV_REASON_PAGE_READY: case KVM_PV_REASON_PAGE_READY:
rcu_irq_enter();
exit_idle();
kvm_async_pf_task_wake((u32)read_cr2()); kvm_async_pf_task_wake((u32)read_cr2());
rcu_irq_exit();
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment