[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH V2 2/2] virtio: introduce STOP status bit
On Wed, Jul 07 2021, Jason Wang <jasowang@redhat.com> wrote: > å 2021/7/6 äå10:27, Cornelia Huck åé: >> On Tue, Jul 06 2021, Jason Wang <jasowang@redhat.com> wrote: >> >>> å 2021/7/6 äå8:50, Cornelia Huck åé: >>>> On Tue, Jul 06 2021, Jason Wang <jasowang@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.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]