On Thu, 28 Nov 2019 12:03:01 -0500 "Michael S. Tsirkin" <m...@redhat.com> 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 [..]