diff options
author | Avi Kivity <avi@qumranet.com> | 2008-05-29 07:55:03 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 05:42:30 -0400 |
commit | d761a501cf9cd4fa08ff35d252ff08b8c31ce677 (patch) | |
tree | d146ce434a058d1c556253af6049599dcc4681d5 /arch/x86/kvm/mmu.c | |
parent | 91ed7a0e15c6f6ff57f5cf70feabdba56a999863 (diff) |
KVM: MMU: Move nonpaging_prefetch_page()
In preparation for next patch. No code change.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 53f1ed852ca2..62741b7c4223 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -776,6 +776,15 @@ static void mmu_page_remove_parent_pte(struct kvm_mmu_page *sp, | |||
776 | BUG(); | 776 | BUG(); |
777 | } | 777 | } |
778 | 778 | ||
779 | static void nonpaging_prefetch_page(struct kvm_vcpu *vcpu, | ||
780 | struct kvm_mmu_page *sp) | ||
781 | { | ||
782 | int i; | ||
783 | |||
784 | for (i = 0; i < PT64_ENT_PER_PAGE; ++i) | ||
785 | sp->spt[i] = shadow_trap_nonpresent_pte; | ||
786 | } | ||
787 | |||
779 | static struct kvm_mmu_page *kvm_mmu_lookup_page(struct kvm *kvm, gfn_t gfn) | 788 | static struct kvm_mmu_page *kvm_mmu_lookup_page(struct kvm *kvm, gfn_t gfn) |
780 | { | 789 | { |
781 | unsigned index; | 790 | unsigned index; |
@@ -1213,15 +1222,6 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, gfn_t gfn) | |||
1213 | } | 1222 | } |
1214 | 1223 | ||
1215 | 1224 | ||
1216 | static void nonpaging_prefetch_page(struct kvm_vcpu *vcpu, | ||
1217 | struct kvm_mmu_page *sp) | ||
1218 | { | ||
1219 | int i; | ||
1220 | |||
1221 | for (i = 0; i < PT64_ENT_PER_PAGE; ++i) | ||
1222 | sp->spt[i] = shadow_trap_nonpresent_pte; | ||
1223 | } | ||
1224 | |||
1225 | static void mmu_free_roots(struct kvm_vcpu *vcpu) | 1225 | static void mmu_free_roots(struct kvm_vcpu *vcpu) |
1226 | { | 1226 | { |
1227 | int i; | 1227 | int i; |