KVM: MMU: Inherit a shadow page's guest level count from vcpu setup
authorAvi Kivity <avi@redhat.com>
Sun, 21 Dec 2008 17:20:09 +0000 (19:20 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:02:51 +0000 (11:02 +0200)
commita770f6f28b1a9287189f3dc8333eb694d9a2f0ab
treeed88e3dc411630780acfae24fc917750df6561d2
parent22ccb14203d59a8bcf6f3fea76b3594d710569fa
KVM: MMU: Inherit a shadow page's guest level count from vcpu setup

Instead of "calculating" it on every shadow page allocation, set it once
when switching modes, and copy it when allocating pages.

This doesn't buy us much, but sets up the stage for inheriting more
information related to the mmu setup.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c