Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> writes: > Sean Christopherson <seanjc@xxxxxxxxxx> writes: > >> On Fri, Oct 15, 2021, Vitaly Kuznetsov wrote: >>> Several selftests (memslot_modification_stress_test, kvm_page_table_test, >>> dirty_log_perf_test,.. ) which rely on vm_get_max_gfn() started to fail >>> since commit ef4c9f4f65462 ("KVM: selftests: Fix 32-bit truncation of >>> vm_get_max_gfn()") on AMD EPYC 7401P: >>> >>> ./tools/testing/selftests/kvm/demand_paging_test >>> Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages >>> guest physical test memory offset: 0xffffbffff000 >> >> This look a lot like the signature I remember from the original bug[1]. I assume >> you're hitting the magic HyperTransport region[2]. I thought that was fixed, but >> the hack-a-fix for selftests never got applied[3]. >> >> [1] https://lore.kernel.org/lkml/20210623230552.4027702-4-seanjc@xxxxxxxxxx/ > > Hey, > > it seems I'm only three months late to the party! > >> [2] https://lkml.kernel.org/r/7e3a90c0-75a1-b8fe-dbcf-bda16502ace9@xxxxxxx >> [3] https://lkml.kernel.org/r/20210805105423.412878-1-pbonzini@xxxxxxxxxx >> > > This patch helps indeed FWIW, 'access_tracking_perf_test' remains broken even after the patch is applied: # ./access_tracking_perf_test Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages guest physical test memory offset: 0xfffcbffff000 Populating memory : 3.858448918s Writing to populated memory : 0.937319626s Reading from populated memory : 0.003073207s ==== Test Assertion Failure ==== lib/kvm_util.c:1382: false pid=6422 tid=6425 errno=4 - Interrupted system call 1 0x000000000040667d: addr_gpa2hva at kvm_util.c:1382 2 (inlined by) addr_gpa2hva at kvm_util.c:1376 3 (inlined by) addr_gva2hva at kvm_util.c:2245 4 0x0000000000402909: lookup_pfn at access_tracking_perf_test.c:98 5 (inlined by) mark_vcpu_memory_idle at access_tracking_perf_test.c:152 6 (inlined by) vcpu_thread_main at access_tracking_perf_test.c:232 7 0x00007fd02d1cb431: ?? ??:0 8 0x00007fd02d0f9912: ?? ??:0 No vm physical memory at 0xfcbffff000 (and my cpuid hack reducing guest physical address space by half doesn't seem to help either) -- Vitaly