[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 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). It just happens to be mapped to the PCI transport as setting the status to 0. For the channel IO transport it is mapped via CCW_CMD_VDEV_RESET while setting the status is mapped via CCW_CMD_WRITE_STATUS. Regards, Halil
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]