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

2022-12-13 Thread Philippe Mathieu-Daudé
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

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

2022-12-12 Thread Sean Christopherson
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: