On 2026-05-13 11:49 AM, Josh Hilke wrote:
> On Tue, May 12, 2026 at 7:12 PM Josh Hilke <[email protected]> wrote:
> > On Mon, May 11, 2026 at 4:45 PM David Matlack <[email protected]> wrote:
> > > On 2026-05-11 09:18 PM, Josh Hilke wrote:

> > > > +     retries = 100;
> > > > +     while (retries-- > 0) {
> > > > +             if (rx->wb.status_error & 1)
> > > > +                     break;
> > > > +             usleep(10);
> > > > +     }
> > >
> > > Why bail after a certain timeout? The test may have kicked off a large
> > > count of memcpys. Is this for error detection?
> >
> > The bailout was intended to detect errors during development.
> > Shouldn't need it anymore. I'll remove it in v2.
> 
> Sorry, I forgot: we need the timeout  to detect DMA errors for the
> memcpy_from_unmapped_iova test in vfio_pci_driver_test. The test
> triggers an IOMMU fault because the IOVA is unmapped, and the IOMMU
> aborts the DMA operation. However, the QEMU IGB implementation does
> not set an error bit, so timing out is our only method for error
> detection.

Hm... that's going to be tricky then. This means we would have to set
the timeout to longer than the longest possible memcpy duration to avoid
false negatives? That means we'll have to set the timeout to quite long.

Reply via email to