aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2022-09-27 15:48:08 +0800
committerMichael S. Tsirkin <mst@redhat.com>2022-10-07 09:32:40 -0400
commit90fea5a800c3dd80fb8ad9a02929bcef5fde42b8 (patch)
treeab3dca9a87fff91f118f5d868c7ab545a7e6d727 /include
parent4959aebba8c06992abafa09d1e80965e0825af54 (diff)
downloadaccel-90fea5a800c3dd80fb8ad9a02929bcef5fde42b8.tar.gz
vdpa: device feature provisioning
This patch allows the device features to be provisioned through netlink. A new attribute is introduced to allow the userspace to pass a 64bit device features during device adding. This provides several advantages: - Allow to provision a subset of the features to ease the cross vendor live migration. - Better debug-ability for vDPA framework and parent. Reviewed-by: Eli Cohen <elic@nvidia.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220927074810.28627-2-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/vdpa.h1
-rw-r--r--include/uapi/linux/vdpa.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index d282f464d2f1a7..6d0f5e4e82c252 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -104,6 +104,7 @@ struct vdpa_iova_range {
};
struct vdpa_dev_set_config {
+ u64 device_features;
struct {
u8 mac[ETH_ALEN];
u16 mtu;
diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h
index 25c55cab3d7c7d..9dc855f37c5942 100644
--- a/include/uapi/linux/vdpa.h
+++ b/include/uapi/linux/vdpa.h
@@ -52,6 +52,8 @@ enum vdpa_attr {
VDPA_ATTR_DEV_VENDOR_ATTR_NAME, /* string */
VDPA_ATTR_DEV_VENDOR_ATTR_VALUE, /* u64 */
+ VDPA_ATTR_DEV_FEATURES, /* u64 */
+
/* new attributes must be added above here */
VDPA_ATTR_MAX,
};