]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Add generic shadow walker
authorAvi Kivity <avi@qumranet.com>
Fri, 22 Aug 2008 16:24:38 +0000 (19:24 +0300)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:15:23 +0000 (10:15 +0200)
commitf58e7ba8f0ba335b734d94fce40678d6e3fb76e4
tree75e8464d300c232efa1793477c555e1a5b7e0a80
parent3b8ebbf3cee8ef4f58e8716c252c5f6aa110dec2
KVM: MMU: Add generic shadow walker

We currently walk the shadow page tables in two places: direct map (for
real mode and two dimensional paging) and paging mode shadow.  Since we
anticipate requiring a third walk (for invlpg), it makes sense to have
a generic facility for shadow walk.

This patch adds such a shadow walker, walks the page tables and calls a
method for every spte encountered.  The method can examine the spte,
modify it, or even instantiate it.  The walk can be aborted by returning
nonzero from the method.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c