Skip to content

Commit 3543b04

Browse files
eugpermarmstsirkin
authored andcommitted
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>
1 parent 0d215af commit 3543b04

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/vhost/vdpa.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
682682
return -EFAULT;
683683
if (idx >= vdpa->ngroups || s.num >= vdpa->nas)
684684
return -EINVAL;
685+
if (ops->get_status(vdpa) & VIRTIO_CONFIG_S_DRIVER_OK)
686+
return -EBUSY;
685687
if (!ops->set_group_asid)
686688
return -EOPNOTSUPP;
687689
return ops->set_group_asid(vdpa, idx, s.num);

0 commit comments

Comments
 (0)