Skip to content

Vitqueue State Synchronization

Jason Wang virtio-comment virtio-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 112 repliesIn review

Changes in v2 from the cover letter

- introduce used_idx for synchronize used state for split virtqueue, this is needed since the used ring is read only by the driver.
- stick to the uni-directional state machine, this means driver is forbidden to clear STOP, the only way to 'resume' the device is to reset and re-initialization the device. This simplify the implementation and make it works more like a vhost device.
- mandate the virtqueue state setting during device initialization
- clarify the steps that are required for saving the virtqueue state
- allow the device to have its specifc way to save and restore extra virtqueue state
- rename DEVICE_STOPPED to STOP
- various other tweaks

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio: introduce virtqueue state as basic facilitycontent.tex+117 -012 replies
2/2virtio: introduce STOP status bitcontent.tex+66 -396 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/2] Vitqueue State Synchronization

Hi All:

This is an updated version to implement virtqueue state synchronization which is a must for the migration support.

The first patch introduces virtqueue states as a new basic facility of the virtio device. This is used by the driver to save and restore virtqueue state. The states were split into available state and used state to ease the transport specific implementation. It is also allowed for the device to have its own device specific way to save and resotre extra virtqueue states like in flight request.

The second patch introduce a new status bit STOP. This bit is used for the driver to stop the device. The major difference from reset is that STOP must preserve all the virtqueue state plus the device state.

A driver can then:

- Get the virtqueue state if STOP status bit is set
- Set the virtqueue state after FEATURE_OK but before DRIVER_OK

Device specific state synchronization could be built on top.

Please review.

Thanks

Changes from V1:

- introduce used_idx for synchronize used state for split virtqueue, this is needed since the used ring is read only by the driver.
- stick to the uni-directional state machine, this means driver is forbidden to clear STOP, the only way to 'resume' the device is to reset and re-initialization the device. This simplify the implementation and make it works more like a vhost device.
- mandate the virtqueue state setting during device initialization
- clarify the steps that are required for saving the virtqueue state
- allow the device to have its specifc way to save and restore extra virtqueue state
- rename DEVICE_STOPPED to STOP
- various other tweaks

Jason Wang (2):
virtio: introduce virtqueue state as basic facility
virtio: introduce STOP status bit

 content.tex | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 180 insertions(+)
Signature · 1 line
2.25.1