KVM: Halt vcpu if page it tries to access is swapped out
authorGleb Natapov <gleb@redhat.com>
Thu, 14 Oct 2010 09:22:46 +0000 (11:22 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:21:39 +0000 (11:21 +0200)
commitaf585b921e5d1e919947c4b1164b59507fe7cd7b
treed0d4cc753d4d58934c5986733d7340fe69e523de
parent010c520e20413dfd567d568aba2b7238acd37e33
KVM: Halt vcpu if page it tries to access is swapped out

If a guest accesses swapped out memory do not swap it in from vcpu thread
context. Schedule work to do swapping and put vcpu into halted state
instead.

Interrupts will still be delivered to the guest and if interrupt will
cause reschedule guest will continue to run another task.

[avi: remove call to get_user_pages_noio(), nacked by Linus; this
      makes everything synchrnous again]

Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
12 files changed:
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/Kconfig
arch/x86/kvm/Makefile
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h
include/trace/events/kvm.h
virt/kvm/Kconfig
virt/kvm/async_pf.c [new file with mode: 0644]
virt/kvm/async_pf.h [new file with mode: 0644]
virt/kvm/kvm_main.c