]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: MMU: pass unadulterated gpa to direct_page_fault
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 6 Aug 2021 09:21:17 +0000 (05:21 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:48 +0000 (03:44 -0400)
Do not bother removing the low bits of the gpa.  This masking dates back
to the very first commit of KVM but it is unnecessary, as exemplified
by the other call in kvm_tdp_page_fault.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index 7ef9c001d1b6974626cc49279657158774b48627..376e90f4f413c5e563fec604676432b0d0af1d68 100644 (file)
@@ -4018,7 +4018,7 @@ static int nonpaging_page_fault(struct kvm_vcpu *vcpu, gpa_t gpa,
        pgprintk("%s: gva %lx error %x\n", __func__, gpa, error_code);
 
        /* This path builds a PAE pagetable, we can map 2mb pages at maximum. */
-       return direct_page_fault(vcpu, gpa & PAGE_MASK, error_code, prefault,
+       return direct_page_fault(vcpu, gpa, error_code, prefault,
                                 PG_LEVEL_2M, false);
 }