Re: [PATCH] iommufd/selftest: Add missing driver_ops for AMDV1 mock domain

Jason Gunthorpe
2026-03-26T12:13:27Z

On Wed, Mar 25, 2026 at 09:46:15AM +0000, Pranjal Shrivastava wrote:
> syzbot found that allocating a mock domain with AMDV1 format could
> cause a WARN_ON because the selftest enabled DYNAMIC_TOP without
> providing the required driver_ops.
>
> Initialize a spinlock (top_lock) and dummy callbacks in the mock
> driver to satisfy the generic PT requirements.

I'm inclined to delete the AMDv1 option entirely, I was thinking about
extending the sefltest to use it but I don't have time..

Syzkaller is hitting this because it found it can use a parameter that
the selftest never uses.

Jason