KVM: Inject asynchronous page fault into a PV guest if page is swapped out.
authorGleb Natapov <gleb@redhat.com>
Thu, 14 Oct 2010 09:22:53 +0000 (11:22 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:23:17 +0000 (11:23 +0200)
commit7c90705bf2a373aa238661bdb6446f27299ef489
treed3d00b4413b0d33254d53bbb3285be82444494d9
parent631bc4878220932fe67fc46fc7cf7cccdb1ec597
KVM: Inject asynchronous page fault into a PV guest if page is swapped out.

Send async page fault to a PV guest if it accesses swapped out memory.
Guest will choose another task to run upon receiving the fault.

Allow async page fault injection only when guest is in user mode since
otherwise guest may be in non-sleepable context and will not be able
to reschedule.

Vcpu will be halted if guest will fault on the same page again or if
vcpu executes kernel code.

Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c
include/trace/events/kvm.h
virt/kvm/async_pf.c