vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature
authorEugenio Pérez <eperezma@redhat.com>
Fri, 9 Jun 2023 09:21:25 +0000 (11:21 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 3 Sep 2023 22:10:22 +0000 (18:10 -0400)
Accepting VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature if
userland sets it.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Message-Id: <20230609092127.170673-3-eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vdpa.c

index b43e868..bb57343 100644 (file)
@@ -680,7 +680,8 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
                        return -EFAULT;
                if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
                                 BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
-                                BIT_ULL(VHOST_BACKEND_F_RESUME)))
+                                BIT_ULL(VHOST_BACKEND_F_RESUME) |
+                                BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK)))
                        return -EOPNOTSUPP;
                if ((features & BIT_ULL(VHOST_BACKEND_F_SUSPEND)) &&
                     !vhost_vdpa_can_suspend(v))