KVM: MMU: Move pte access calculation into a helper function