diff options
author | Sean Christopherson <seanjc@google.com> | 2022-12-13 03:16:42 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-27 14:00:46 +0300 |
commit | d61a12cb9af5b355a38e0c0106e91224b49195ce (patch) | |
tree | d199863c3c272fff8778728a9a2b792b3f1650be /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 73441efa36c253906057b8800bc9a3fdadbc2c41 (diff) | |
download | linux-d61a12cb9af5b355a38e0c0106e91224b49195ce.tar.xz |
KVM: selftests: Fix divide-by-zero bug in memslot_perf_test
Check that the number of pages per slot is non-zero in get_max_slots()
prior to computing the remaining number of pages. clang generates code
that uses an actual DIV for calculating the remaining, which causes a #DE
if the total number of pages is less than the number of slots.
traps: memslot_perf_te[97611] trap divide error ip:4030c4 sp:7ffd18ae58f0
error:0 in memslot_perf_test[401000+cb000]
Fixes: a69170c65acd ("KVM: selftests: memslot_perf_test: Report optimal memory slots")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221213001653.3852042-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions