On Wed, Jul 07 2021, Jason Wang <jasow...@redhat.com> wrote: > 在 2021/7/6 下午10:27, Cornelia Huck 写道: >> On Tue, Jul 06 2021, Jason Wang <jasow...@redhat.com> wrote: >> >>> 在 2021/7/6 下午8:50, Cornelia Huck 写道: >>>> On Tue, Jul 06 2021, Jason Wang <jasow...@redhat.com> wrote: >>>>> +If VIRTIO_F_STOP has been negotiated, to stop a device, after setting >>>>> +STOP, the driver MUST re-read the device status to ensure the STOP bit >>>>> +is set to synchronize with the device. >>>> Is this more that the driver needs to re-read the status until STOP is >>>> set to make sure that the stop process has finished? >>> >>> Yes. >>> >>> >>>> If the device has >>>> offered the feature and the driver accepted it, I'd assume that the >>>> device will eventually finish with the procedure, or sets NEEDS_RESET if >>>> something goes wrong? >>> >>> As stated below, the device must either: >>> >>> 1) finish all pending requests >>> >>> or >>> >>> 2) provide a device specific way for the driver to save and restore >>> pending requests >>> >>> before setting STOP. >>> >>> Otherwise the device can't offer this feature. >>> >>> Using NEEDS_RESET seems more complicated than this. >> Hm, what happens on an internal error? > > > A question, can reset fail? If yes, do we need to define how to proceed > in the driver side? > > If not, I don't need the reason we need to deal with that in the STOP.
When you put it that way, it makes sense. Let's just keep it simple, then. --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org