cloud-hypervisor/vm-virtio/src
Sebastien Boeuf 475040b29e vm-virtio: Correctly reset the virtqueues
Upon a virtio reset, the driver expects that available and used indexes
will be reset to 0. That's why we need to reset these values from the
VMM for any virtio device that might get reset.

This issue was not detected before because the Vec<Queue> maintained
through VirtioPciDevice or MmioDevice was never updated from the virtio
device thread after the device had been actived. For this reason, upon
reset, both available and used indexes were already at the value 0.

The issue arose when trying to reset a device after the VM was restored.
That's because during the restore, each queue is assigned with the right
available and used indexes before it is passed to the device through the
activate function. And that's why upon reset, each queue was still
assigned with these indexes while it should have been reset to 0.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-05-08 11:31:50 +01:00
..
transport vm-virtio: Add virtio reset() support to MmioDevice 2020-05-08 11:31:16 +01:00
vhost_user vm-virtio: vhost-user-net: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
vsock vm-virtio, vmm: Delete unix socket on shutdown 2020-05-05 13:01:38 +02:00
block.rs vm-virtio: blk: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
console.rs vm-virtio: console: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
device.rs vm-virtio: Get userspace mappings from VirtioDevice 2020-04-21 10:02:21 +01:00
iommu.rs vm-virtio: iommu: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
lib.rs virtio-mem: Return reize error in MemEpollHandler.run 2020-05-03 10:21:49 +01:00
mem.rs virtio-mem: Return reize error in MemEpollHandler.run 2020-05-03 10:21:49 +01:00
net_util.rs vm-virtio: Implement the Snapshottable trait for Net 2020-04-21 21:25:03 +02:00
net.rs vm-virtio: net: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
pmem.rs vm-virtio: pmem: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
queue.rs vm-virtio: Correctly reset the virtqueues 2020-05-08 11:31:50 +01:00
rng.rs vm-virtio: rng: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00