]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Retry fault before vmentry
authorGleb Natapov <gleb@redhat.com>
Sun, 17 Oct 2010 16:13:42 +0000 (18:13 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:23:06 +0000 (11:23 +0200)
commit430a7ba2453dfa3a26cf13c34626a831a8eb5df4
treefa42d19f235c585c6514337a26db9641780ac759
parent62cd8956f01346832138412bd3e62ee56bac30f2
KVM: Retry fault before vmentry

When page is swapped in it is mapped into guest memory only after guest
tries to access it again and generate another fault. To save this fault
we can map it immediately since we know that guest is going to access
the page. Do it only when tdp is enabled for now. Shadow paging case is
more complicated. CR[034] and EFER registers should be switched before
doing mapping and then switched back.

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/paging_tmpl.h
arch/x86/kvm/x86.c
virt/kvm/async_pf.c