Re: [PATCH v2] vfio/ccw: Flush notoper_work before returning from reset

From: Yuho Choi

Date: Mon Nov 09 2026 - 13:15:42 EST


On Mon, 9 Nov 2026 at 07:38, Christian Borntraeger
<borntraeger@xxxxxxxxxxxxx> wrote:
>
> Does the the iommufd backend have the same problem?
> iopt_unmap_iova_range() keeps calling the unmap callback and gives up with
> WARN_ON(tries > 100) and -EDEADLOCK. So that path is also fixed, I guess.

Yes. With iommufd, vfio_ccw_dma_unmap() is reached through
vfio_emulated_unmap(), so the pages are left pinned in the same way.
iopt_unmap_iova_range() then retries, and if notoper_work has not run
by then, it warns and fails the unmap with -EDEADLOCK instead of
hitting the BUG_ON. With the flush, the pages are unpinned before the
callback returns on both backends.

> > Fixes: 0c11f61a876e ("s390/vfio_ccw: Move cp cleanup out of not operational")
> cc stable ?

I'm not sure, so I'll leave that to you.