On Mon, Nov 16, 2020 at 07:16:50PM +0100, Paolo Bonzini wrote: > On 16/11/20 13:19, Andrew Jones wrote: > > This series attempts to clean up demand_paging_test, dirty_log_perf_test, > > and dirty_log_test by factoring out common code, creating some new API > > along the way. It also splits include/perf_test_util.h into a more > > conventional header and source pair. > > > > I've tested on x86 and AArch64 (one config each), but not s390x. > > > > v3: > > - Rebased remaining four patches from v2 onto kvm/queue > > - Picked up r-b's from Peter and Ben > > > > v2: https://www.spinics.net/lists/kvm/msg228711.html > > Unfortunately patch 2 is still broken: > > $ ./dirty_log_test -M dirty-ring > Setting log mode to: 'dirty-ring' > Test iterations: 32, interval: 10 (ms) > Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages > ==== Test Assertion Failure ==== > lib/kvm_util.c:85: ret == 0 > pid=2010122 tid=2010122 - Invalid argument > 1 0x0000000000402ee7: vm_enable_cap at kvm_util.c:84 > 2 0x0000000000403004: vm_enable_dirty_ring at kvm_util.c:124 > 3 0x00000000004021a5: log_mode_create_vm_done at dirty_log_test.c:453 > 4 (inlined by) run_test at dirty_log_test.c:683 > 5 0x000000000040b643: for_each_guest_mode at guest_modes.c:37 > 6 0x00000000004019c2: main at dirty_log_test.c:864 > 7 0x00007fe3f48207b2: ?? ??:0 > 8 0x0000000000401aad: _start at ??:? > KVM_ENABLE_CAP IOCTL failed, > rc: -1 errno: 22 > So I finally looked closely enough at the dirty-ring stuff to see that patch 2 was always a dumb idea. dirty_ring_create_vm_done() has a comment that says "Switch to dirty ring mode after VM creation but before any of the vcpu creation". I'd argue that that comment would be better served at the log_mode_create_vm_done() call, but that doesn't excuse my sloppiness here. Maybe someday we can add a patch that adds that comment and also tries to use common code for the number of pages calculation for the VM, but not today. Regarding this series, if the other three patches look good, then we can just drop 2/4. 3/4 and 4/4 should still apply cleanly and work. Thanks, drew