On Wed, Jan 22, 2025 at 1:01 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > Il mer 22 gen 2025, 07:07 John Stultz <jstultz@xxxxxxxxxx> ha scritto: > > > > I then cut down and ported the bionic test out so it could build under > > a standard debian environment: > > https://github.com/johnstultz-work/bionic-ptrace-reproducer > > > > Where I was able to reproduce the same problem in a debian VM (after > > running the test in a loop for a short while). > > > Thanks, that's nice to have. > > > Now, here's where it is odd. I could *not* reproduce the problem on > > bare metal hardware, *nor* could I reproduce the problem in a virtual > > environment. I can *only* reproduce the problem with nested > > virtualization (running the VM inside a VM). > > Typically in that case the best thing to do is turn it into a > kvm-unit-test or selftest (though that's often an endeavor of its own, > as it requires distilling the Linux kernel and userspace code into a > guest that runs without an OS). But what you've done is already a good > step. Just run the kvm-unit-tests 'x86/debug' test in a loop inside an L1 VM. It will eventually fail. Maybe not the same bug, but we can hope. :) > > I have reproduced this on my intel i12 NUC using the same v6.12 kernel > > on metal + virt + nested environments. It also reproduced on the NUC > > with v5.15 (metal) + v6.1 (virt) + v6.1(nested). > > Good that you can use a new kernel. Older kernels are less reliable > with nested virt (especially since the one that matters the most is > the metal one). > > Paolo > > > I've tried to do some tracing in the arch/x86/kvm/x86.c logic, but > > I've not yet directly correlated anything on the hosts to the point > > where we read the zero DR6 value in the nested guest. > > > > But I'm not very savvy around virtualization or ptrace watchpoints or > > low level details around intel DB6 register, so I wanted to bring this > > up on the list to see if folks had suggestions or ideas to further > > narrow this down? Happy to test things as it's pretty simple to > > reproduce here. > > > > Many thanks to Alex Bennee and Jim Mattson for their testing > > suggestions to help narrow this down so far. > > > > thanks > > -john > > >