summaryrefslogtreecommitdiff
path: root/drivers/vhost
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2026-01-19 15:32:59 +0100
committerMichael S. Tsirkin <mst@redhat.com>2026-01-28 15:32:17 -0500
commit3543b04a4ea3de78bdc420350d21c538efd6116c (patch)
tree720cb0f38deb12837e0dfc989d7f1d0c17da2562 /drivers/vhost
parent0d215afdc8199ef9702567778bbc781449f48e50 (diff)
downloadlinux-next-3543b04a4ea3de78bdc420350d21c538efd6116c.tar.gz
linux-next-3543b04a4ea3de78bdc420350d21c538efd6116c.zip
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: Jason Wang <jasowang@redhat.com> Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260119143306.1818855-7-eperezma@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vdpa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 9d25b735b43d..3f0184d42075 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -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);