crosvm/devices
Tomasz Nowicki 70a71f8d89 devices: virtio: vhost: fix device initialization race condition
Complete vhost worker queue init before spawning thread routine.

Enabling a virtio devices requires updating the
VIRTIO_CONFIG_S_DRIVER_OK bit, which signifies that the devices is
ready to process the virtio queue. Do this before spawning the worker
thread in order to avoid the situation where a guest VM starts using the
queues before initialization has been completed.

Also make this fix for vhost net and vsock.

BUG=b:200658613
TEST=boot with vhost-net interface and check that network is working fine

Change-Id: Ibc505ba63d692d9c5380d9ec3b6f80d75ff99181
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3015206
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Tomasz Nowicki <tnowicki@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-09-21 18:44:40 +00:00
..
src devices: virtio: vhost: fix device initialization race condition 2021-09-21 18:44:40 +00:00
.build_test_serial
Cargo.toml