[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-comment] [PATCH RFC] virtio: introduce VIRTIO_F_DEVICE_STOP
On Wed, 13 Jan 2021 10:52:32 +0800 Jason Wang <jasowang@redhat.com> wrote: > On 2021/1/12 äå8:13, Cornelia Huck wrote: > > On Tue, 12 Jan 2021 11:27:20 +0800 > > Jason Wang <jasowang@redhat.com> wrote: > > > >> On 2021/1/12 äå2:16, Cornelia Huck wrote: > >>> On Wed, 30 Dec 2020 16:15:47 +0800 > >>> Jason Wang <jasowang@redhat.com> wrote: > >>> > >>>> On 2020/12/29 äå9:35, Halil Pasic wrote: > >>>>> On Mon, 28 Dec 2020 15:01:57 +0800 > >>>>> Jason Wang <jasowang@redhat.com> wrote: > >>>>> > >>>>>> Some part of the virtio has enforced an asynchronous interface during reset: > >>>>>> > >>>>>> For MMIO the spec said: > >>>>>> > >>>>>> """ > >>>>>> > >>>>>> To stop using the queue the driver MUST write zero (0x0) to this > >>>>>> QueueReady and MUST read the value back to ensure synchronization. > >>>>>> > >>>>>> """ > >>>>> I read the MMIO quote like a single read is sufficient to ensure > >>>>> synchronization. I.e. it does not require a loop which waits for > >>>>> the read to yield the expected value. > >>>>> > >>>>>> For PCI it said: > >>>>>> > >>>>>> """ > >>>>>> > >>>>>> After writing 0 to device_status, the driver MUST wait for a read of > >>>>>> device_status to return 0 before reinitializing the device. > >>>>>> > >>>>>> """ > >>>>> Yes, this does sound like a loop. And that's what Linux does. But this > >>>>> is transport (PCI) specific. On a spec level, a reset is a distinct > >>>>> operation from setting device status (to 0). > >>>> I'm not sure or it looks unclear to me for this point. > >>>> > >>>> E.g the device reset is mentioned in "Device Status Field" belongs to > >>>> "Basic Facilities of a Virtio Device". But there's no "Device Reset" in > >>>> "Basic Facilities of a Virtio Device". > >>> I think it should be, just to make clear what a driver-initiated reset > >>> of a device actually resets (and that the method for doing so is > >>> transport-specific.) > >> > >> Then we need some clarifications in the spec. It would be easily imply > >> that reset is part of device status after reading "Basic Facilities of a > >> Virtio Device". > > I can try to come up with a patch. > > > Thanks Attempt here: https://lists.oasis-open.org/archives/virtio-comment/202101/msg00020.html
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]