diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2022-08-02 10:49:59 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2022-10-07 09:41:51 -0400 |
| commit | b8f3e6a18de6ad5cb668c5430b4933f1e40783cf (patch) | |
| tree | 5dae60d01c48a72924737b17221176a1020be804 /hw/scsi/vhost-user-scsi.c | |
| parent | 9f6bcfd99f46377888059d8539befec9505f57fb (diff) | |
| download | focaccia-qemu-b8f3e6a18de6ad5cb668c5430b4933f1e40783cf.tar.gz focaccia-qemu-b8f3e6a18de6ad5cb668c5430b4933f1e40783cf.zip | |
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>
Diffstat (limited to 'hw/scsi/vhost-user-scsi.c')
| -rw-r--r-- | hw/scsi/vhost-user-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index 1b2f7eed98..bc37317d55 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -49,7 +49,7 @@ static void vhost_user_scsi_set_status(VirtIODevice *vdev, uint8_t status) VHostSCSICommon *vsc = VHOST_SCSI_COMMON(s); bool start = (status & VIRTIO_CONFIG_S_DRIVER_OK) && vdev->vm_running; - if (vsc->dev.started == start) { + if (vhost_dev_is_started(&vsc->dev) == start) { return; } |