mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
vhost-blk: set features before setting inflight feature
Virtqueue has split and packed, so before setting inflight, you need to inform the back-end virtqueue format. Signed-off-by: Jin Yu <jin.yu@intel.com> Message-Id: <20200910134851.7817-1-jin.yu@intel.com> Acked-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
6a5b19ca63
commit
adb29c0273
3 changed files with 25 additions and 0 deletions
|
@ -131,6 +131,12 @@ static int vhost_user_blk_start(VirtIODevice *vdev)
|
|||
|
||||
s->dev.acked_features = vdev->guest_features;
|
||||
|
||||
ret = vhost_dev_prepare_inflight(&s->dev);
|
||||
if (ret < 0) {
|
||||
error_report("Error set inflight format: %d", -ret);
|
||||
goto err_guest_notifiers;
|
||||
}
|
||||
|
||||
if (!s->inflight->addr) {
|
||||
ret = vhost_dev_get_inflight(&s->dev, s->queue_size, s->inflight);
|
||||
if (ret < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue