Re: [PATCH 03/14] KVM: selftests: Fix divide-by-zero bug in memslot_perf_test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/12/22 01:16, Sean Christopherson wrote:
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@xxxxxxxxxx>
---
  tools/testing/selftests/kvm/memslot_perf_test.c | 3 +++
  1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux