On Tue, Jun 28, 2022 at 3:43 PM Stefano Garzarella <sgarzare@xxxxxxxxxx> wrote:
On Thu, Jun 23, 2022 at 06:07:36PM +0200, Eugenio Pérez wrote:
>Userland knows if it can suspend the device or not by checking this feature
>It's only offered if the vdpa driver backend implements the suspend()
>operation callback, and to offer it or userland to ack it if the backend
>does not offer that callback is an error.
Should we document in the previous patch that the callback must be
implemented only if the drive/device support it?
It's marked as optional in the doc, following other optional callbacks
like set_group_asid for example. But I'm ok with documenting this
The rest LGTM although I have a doubt whether it is better to move this
patch after patch 3, or merge it with patch 3, for bisectability since
we enable the feature here but if the userspace calls ioctl() with
VHOST_VDPA_SUSPEND we reply back that it is not supported.
I'm fine with moving it, but we will have that behavior with all the
devices anyway. Regarding userspace, we just replace ENOIOCTL with
EOPNOTSUPP. Or I'm missing something?