diff options
author | Ben Gardon <bgardon@google.com> | 2019-04-08 11:07:30 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-08-13 12:39:08 +0100 |
commit | 3849fe35584d1c936603d1a357f87ef95df5ec55 (patch) | |
tree | 062f15b6954723203aaece57be90d7afead2cd3d /arch/arm64/include | |
parent | a5c377c984958c34fe6d7a833bc439dbd6c06db3 (diff) |
kvm: mmu: Fix overflow on kvm mmu page limit calculation
commit bc8a3d8925a8fa09fa550e0da115d95851ce33c6 upstream.
KVM bases its memory usage limits on the total number of guest pages
across all memslots. However, those limits, and the calculations to
produce them, use 32 bit unsigned integers. This can result in overflow
if a VM has more guest pages that can be represented by a u32. As a
result of this overflow, KVM can use a low limit on the number of MMU
pages it will allocate. This makes KVM unable to map all of guest memory
at once, prompting spurious faults.
Tested: Ran all kvm-unit-tests on an Intel Haswell machine. This patch
introduced no new failures.
Signed-off-by: Ben Gardon <bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch/arm64/include')
0 files changed, 0 insertions, 0 deletions