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

Jason Gunthorpe
2026-03-27T12:08:03Z

On Thu, Mar 26, 2026 at 12:25:45PM +0000, Pranjal Shrivastava wrote:
> 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?

Yes

Jason