]> xenbits.xensource.com Git - qemu-xen.git/commit
vdpa: return errno in vhost_vdpa_get_vring_group error
authorEugenio Pérez <eperezma@redhat.com>
Fri, 26 May 2023 15:31:42 +0000 (17:31 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 23 Jun 2023 06:54:44 +0000 (02:54 -0400)
commit0f2bb0bf38b04e9dfdc32ce5c762dd317f5a4c5a
tree900e216f82d616109e1c515c0be8807ae04a639f
parent25c893037b89ddd4e42927a2a9b524dbbc0c34a3
vdpa: return errno in vhost_vdpa_get_vring_group error

We need to tell in the caller, as some errors are expected in a normal
workflow.  In particular, parent drivers in recent kernels with
VHOST_BACKEND_F_IOTLB_ASID may not support vring groups.  In that case,
-ENOTSUP is returned.

This is the case of vp_vdpa in Linux 6.2.

Next patches in this series will use that information to know if it must
abort or not.  Also, next patches return properly an errp instead of
printing with error_report.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20230526153143.470745-2-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
net/vhost-vdpa.c