diff options
author | Zhu Lingshan | 2024-02-19 02:55:57 +0800 |
---|---|---|
committer | Michael S. Tsirkin | 2024-03-19 02:45:51 -0400 |
commit | c2475a9a789721bfdcc1b16aaf61ccfecb891914 (patch) | |
tree | a984cafce3c3878cdc73e72838fe3bf254b868e6 /include | |
parent | 2b666ee29618f452b84aeacf08e1267894de7234 (diff) |
vDPA: report virtio-block capacity to user space
This commit allows userspace to query capacity of
a virtio-block device.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Message-Id: <20240218185606.13509-2-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vdpa.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/vdpa.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 4097e8e92860..7977ca03ac7a 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -7,6 +7,7 @@ #include <linux/interrupt.h> #include <linux/vhost_iotlb.h> #include <linux/virtio_net.h> +#include <linux/virtio_blk.h> #include <linux/if_ether.h> /** diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h index 54b649ab0f22..1bf69226cb96 100644 --- a/include/uapi/linux/vdpa.h +++ b/include/uapi/linux/vdpa.h @@ -56,6 +56,8 @@ enum vdpa_attr { /* virtio features that are provisioned to the vDPA device */ VDPA_ATTR_DEV_FEATURES, /* u64 */ + VDPA_ATTR_DEV_BLK_CFG_CAPACITY, /* u64 */ + /* new attributes must be added above here */ VDPA_ATTR_MAX, }; |