On Wed, Oct 28, 2020 at 07:30:55AM -0400, Michael S. Tsirkin wrote: > On Wed, Oct 28, 2020 at 11:00:38AM +0000, Stefan Hajnoczi wrote: > > On Tue, Oct 27, 2020 at 09:04:46AM -0400, Michael S. Tsirkin wrote: > > > It's not a waste of time, it's just a lot of work > > > within guests. > > > > Luckily it does no harm to set the NEEDS_RESET bit even if the guest > > doesn't handle it. > > > > If the guest driver is unaware it may continue to submit requests to the > > device for a while. The device emulation code stops accepting new > > requests though. This means the device will become unresponsive until > > reset, which is not ideal but okay in the case where the device was put > > into an invalid state. > > There is no actual rule that device must stop processing requests. > Driver can only assume that is the case after it started the > actual reset.
Right, I mean QEMU's implementation stops processing new requests once the device has been marked "broken": void *virtqueue_pop(VirtQueue *vq, size_t sz) { if (virtio_device_disabled(vq->vdev)) { <--- return NULL;
signature.asc
Description: PGP signature