[PATCH v5 5/7] iommu: Add virtio-iommu driver

Michael S. Tsirkin
2018-11-27T18:13:24Z

On Tue, Nov 27, 2018 at 05:50:50PM +0000, Jean-Philippe Brucker
wrote:
> > I didn't notice this in the past but it seems this will spin
> > with interrupts disabled until host handles the request.
> > Please do not do this - host execution can be another
> > task that needs the same host CPU. This will then disable
> > interrupts for a very very long time.
>
> In the guest yes, but that doesn't prevent the host from running
another
> task right? My tests run fine when QEMU is bound to a single CPU, even
> though vcpu and viommu run in different threads

So a kind of a solution is to add a config space field for sync.
That at least can give host a hint that yes, vcpu
is stopped now and it should do something else.
Not ideal but better than polling VQ forever.

--
MST