Commit 3543b04a authored by Eugenio Pérez's avatar Eugenio Pérez Committed by Michael S. Tsirkin
Browse files

vhost: forbid change vq groups ASID if DRIVER_OK is set



Only vdpa_sim support it.  Forbid this behaviour as there is no use for
it right now, we can always enable it in the future with a feature flag.

Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Message-Id: <20260119143306.1818855-7-eperezma@redhat.com>
parent 0d215afd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -682,6 +682,8 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
			return -EFAULT;
		if (idx >= vdpa->ngroups || s.num >= vdpa->nas)
			return -EINVAL;
		if (ops->get_status(vdpa) & VIRTIO_CONFIG_S_DRIVER_OK)
			return -EBUSY;
		if (!ops->set_group_asid)
			return -EOPNOTSUPP;
		return ops->set_group_asid(vdpa, idx, s.num);