mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/virtio: move vhd->started check into helper and add FIXME
The `started` field is manipulated internally within the vhost code
except for one place, vhost-user-blk via f5b22d06fb
(vhost: recheck
dev state in the vhost_migration_log routine). Mark that as a FIXME
because it introduces a potential race. I think the referenced fix
should be tracking its state locally.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-12-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwittz@nutanix.com>
This commit is contained in:
parent
9f6bcfd99f
commit
b8f3e6a18d
10 changed files with 33 additions and 13 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "hw/virtio/virtio-access.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/virtio/vhost.h"
|
||||
#include "hw/virtio/vhost-vsock.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "monitor/monitor.h"
|
||||
|
@ -199,7 +200,7 @@ int vhost_vsock_common_pre_save(void *opaque)
|
|||
* At this point, backend must be stopped, otherwise
|
||||
* it might keep writing to memory.
|
||||
*/
|
||||
assert(!vvc->vhost_dev.started);
|
||||
assert(!vhost_dev_is_started(&vvc->vhost_dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue