[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 0/2] vhost: Fix last queue index of devices with no cvq

From: Eugenio Pérez
Subject: [PATCH v3 0/2] vhost: Fix last queue index of devices with no cvq
Date: Wed, 3 Nov 2021 11:01:29 +0100

The -1 assumes that all devices with no cvq have an spare vq allocated
for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This is an invalid
device by the standard, so just stick to the right number of device

This is not a problem to vhost-net, but it is to vhost-vdpa, which
device model trust to reach the last index to finish starting the

Tested with vp_vdpa with host's vhost=on and vhost=off.

* Recover cvq devices.
* Rename last_index to last_vq_index

* Delete all the conditional code instead of ROUND_DOWN in a
  deinitely too-bit-tricky way.

Eugenio Pérez (2):
  vhost: Rename last_index to last_vq_index
  vhost: Fix last vq queue index of devices with no cvq

 include/hw/virtio/vhost.h | 2 +-
 hw/net/vhost_net.c        | 8 ++++----
 hw/virtio/vhost-vdpa.c    | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]