]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Avoid modulo operator on 64-bit value to fix i386 build
authorSean Christopherson <sean.j.christopherson@intel.com>
Sat, 24 Oct 2020 03:11:50 +0000 (20:11 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 24 Oct 2020 08:05:40 +0000 (04:05 -0400)
commitd9cdb505f96925b91d89033d4defee7cc75d073a
treefc6151b1ec98254eb30a050e34a062bcbc55a4fd
parent67f7e82b35384b5bfa08063b81f93ec721d36775
KVM: x86/mmu: Avoid modulo operator on 64-bit value to fix i386 build

Replace a modulo operator with the more common pattern for computing the
gfn "offset" of a huge page to fix an i386 build error.

  arch/x86/kvm/mmu/tdp_mmu.c:212: undefined reference to `__umoddi3'

In fact, almost all of tdp_mmu.c can be elided on 32-bit builds, but
that is a much larger patch.

Fixes: 9401e7137707 ("kvm: x86/mmu: Add functions to handle changed TDP SPTEs")
Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20201024031150.9318-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c