qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] virtio-pci: disable vring processing when bus-mastering i


From: Halil Pasic
Subject: Re: [PATCH v2] virtio-pci: disable vring processing when bus-mastering is disabled
Date: Fri, 29 Nov 2019 14:51:36 +0100

On Thu, 28 Nov 2019 12:03:01 -0500
"Michael S. Tsirkin" <address@hidden> wrote:

[..]

> > 
> > But it keeps nagging me, is it really OK for the device to access the
> > virtio ring during reset? My intuition tells me that the device should
> > not look for new requests after it has been told to reset.
> 
> 
> Well it's after it was told to reset but it's not after
> it completed reset. So I think it's fine ...

Thanks Michael! I agree and we are covered by the specification. Namely
3.3.1 Driver Requirements: Device Cleanup says "Thus a driver MUST
ensure a virtqueue isn’t live (by device reset) before removing exposed
buffers.". Draining the available buffers from the queue is not wrong -- 
although possibly unnecessary.

So I guess for externally initiated resets (ones not initiated by the
driver) we just have to make sure that the virtio structures are intact
until the virtio device is reset.

Regards,
Halil 

[..]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]