OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[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



å 2021/7/8 äå12:45, Cornelia Huck åé:
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.


I agree and according to the spec, reset should succeed, since it was used to recover from NEEDS_RESET:

"""

The driver SHOULD NOT rely on completion of operations of a device if DEVICE_NEEDS_RESET is set. Note: For example, the driver canât assume requests in flight will be completed if DEVICE_NEEDS_RESET is set, nor can it assume that they have not been completed. A good implementation will try to recover by issuing a reset.

"""

Thanks






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]