summaryrefslogtreecommitdiffstats
path: root/include/linux/vdpa.h
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2023-06-09 11:21:26 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-09-03 18:10:22 -0400
commitb63e5c70c39349ea5b9e7dbb604551902fc753fc (patch)
tree60105d6153280fe4dfa5ce68157b3b40a2681ddb /include/linux/vdpa.h
parent9f09fd6171fe8badef7875ab1642e67360bc5483 (diff)
downloadlinux-stable-b63e5c70c39349ea5b9e7dbb604551902fc753fc.tar.gz
linux-stable-b63e5c70c39349ea5b9e7dbb604551902fc753fc.tar.bz2
linux-stable-b63e5c70c39349ea5b9e7dbb604551902fc753fc.zip
vdpa: add get_backend_features vdpa operation
This operation allow vdpa parent to expose its own backend feature bits. Next patches introduce a feature not compatible with all parent drivers: the ability to enable vq after driver_ok. Each parent must declare if it allows it or not. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Shannon Nelson <shannon.nelson@amd.com> Message-Id: <20230609092127.170673-4-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/vdpa.h')
-rw-r--r--include/linux/vdpa.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index db1b0eaef4eb..0e652026b776 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -208,6 +208,9 @@ struct vdpa_map_file {
* @vdev: vdpa device
* Returns the virtio features support by the
* device
+ * @get_backend_features: Get parent-specific backend features (optional)
+ * Returns the vdpa features supported by the
+ * device.
* @set_driver_features: Set virtio features supported by the driver
* @vdev: vdpa device
* @features: feature support by the driver
@@ -358,6 +361,7 @@ struct vdpa_config_ops {
u32 (*get_vq_align)(struct vdpa_device *vdev);
u32 (*get_vq_group)(struct vdpa_device *vdev, u16 idx);
u64 (*get_device_features)(struct vdpa_device *vdev);
+ u64 (*get_backend_features)(const struct vdpa_device *vdev);
int (*set_driver_features)(struct vdpa_device *vdev, u64 features);
u64 (*get_driver_features)(struct vdpa_device *vdev);
void (*set_config_cb)(struct vdpa_device *vdev,