cloud-hypervisor/vhost_user_backend
Sebastien Boeuf c2137e33a0 vhost_user_backend: Don't discard events when queue is not enabled
The vhost crate does not support the need_reply flag yet, meaning we
can't be sure the backend is properly setup before the guest goes on.

One can run in a race condition where the VMM enables the vring, but
never gets any acknowledgement, meaning it assumes everything went well
and finalize the virtio device activation. Once the device is seen as
ready by the guest, it keeps going by sending some messages through the
virtqueues. Problem is, if it took some time for the backend to enable
the queue, one of the backend thread might receive a kick from the guest
while the corresponding queue is not enabled. This leads to the loss of
the event as it is discarded because the queue is not enabled.

Until vhost crate allows for requests with ACK, the way to mitigate this
issue is by ignoring an event coming up on a queue that has not been
enabled.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-05-19 18:21:47 +02:00
..
src vhost_user_backend: Don't discard events when queue is not enabled 2021-05-19 18:21:47 +02:00
Cargo.toml build(deps): bump libc from 0.2.93 to 0.2.94 2021-04-28 07:02:14 +00:00