diff options
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 21cfa289d0fe..33cd7c982dd3 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -979,10 +979,9 @@ static void nonpaging_new_cr3(struct kvm_vcpu *vcpu) | |||
979 | { | 979 | { |
980 | } | 980 | } |
981 | 981 | ||
982 | static int __nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, | 982 | static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write, |
983 | gfn_t gfn, struct page *page) | 983 | gfn_t gfn, struct page *page, int level) |
984 | { | 984 | { |
985 | int level = PT32E_ROOT_LEVEL; | ||
986 | hpa_t table_addr = vcpu->arch.mmu.root_hpa; | 985 | hpa_t table_addr = vcpu->arch.mmu.root_hpa; |
987 | int pt_write = 0; | 986 | int pt_write = 0; |
988 | 987 | ||
@@ -1042,7 +1041,7 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, gfn_t gfn) | |||
1042 | 1041 | ||
1043 | spin_lock(&vcpu->kvm->mmu_lock); | 1042 | spin_lock(&vcpu->kvm->mmu_lock); |
1044 | kvm_mmu_free_some_pages(vcpu); | 1043 | kvm_mmu_free_some_pages(vcpu); |
1045 | r = __nonpaging_map(vcpu, v, write, gfn, page); | 1044 | r = __direct_map(vcpu, v, write, gfn, page, PT32E_ROOT_LEVEL); |
1046 | spin_unlock(&vcpu->kvm->mmu_lock); | 1045 | spin_unlock(&vcpu->kvm->mmu_lock); |
1047 | 1046 | ||
1048 | up_read(&vcpu->kvm->slots_lock); | 1047 | up_read(&vcpu->kvm->slots_lock); |