diff options
author | David Matlack <[email protected]> | 2021-05-21 17:38:28 +0000 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2021-05-27 07:45:54 -0400 |
commit | ef4c9f4f654622fa15b7a94a9bd1f19e76bb7feb (patch) | |
tree | 696ca6602c9a16c7b3f536f604831eb738b1a364 /scripts/gdb/linux/timerlist.py | |
parent | cad347fab142bcb9bebc125b5ba0c1e52ce74fdc (diff) |
KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()
vm_get_max_gfn() casts vm->max_gfn from a uint64_t to an unsigned int,
which causes the upper 32-bits of the max_gfn to get truncated.
Nobody noticed until now likely because vm_get_max_gfn() is only used
as a mechanism to create a memslot in an unused region of the guest
physical address space (the top), and the top of the 32-bit physical
address space was always good enough.
This fix reveals a bug in memslot_modification_stress_test which was
trying to create a dummy memslot past the end of guest physical memory.
Fix that by moving the dummy memslot lower.
Fixes: 52200d0d944e ("KVM: selftests: Remove duplicate guest mode handling")
Reviewed-by: Venkatesh Srinivas <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions