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

Pranjal Shrivastava
2026-03-26T12:25:57Z

On Thu, Mar 26, 2026 at 09:13:25AM -0300, Jason Gunthorpe wrote:
> 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..
>

Ack. so should we entirely remove MOCK_IOMMUPT_AMDV1? as in from the
uAPI header as well?

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

Thanks,
Praan