@@ -367,6 +367,9 @@ static void vp_transport_features(struct virtio_device *vdev, u64 features)
if (features & BIT_ULL(VIRTIO_F_ADMIN_VQ))
__virtio_set_bit(vdev, VIRTIO_F_ADMIN_VQ);
+
+ if (features & BIT_ULL(VIRTIO_F_SHM_PAGE_SIZE))
+ __virtio_set_bit(vdev, VIRTIO_F_SHM_PAGE_SIZE);
}
static int __vp_check_common_size_one_feature(struct virtio_device *vdev, u32 fbit,
@@ -2983,6 +2983,8 @@ void vring_transport_features(struct virtio_device *vdev)
break;
case VIRTIO_F_NOTIFICATION_DATA:
break;
+ case VIRTIO_F_SHM_PAGE_SIZE:
+ break;
default:
/* We don't understand this bit. */
__virtio_clear_bit(vdev, i);
@@ -52,7 +52,7 @@
* rest are per-device feature bits.
*/
#define VIRTIO_TRANSPORT_F_START 28
-#define VIRTIO_TRANSPORT_F_END 42
+#define VIRTIO_TRANSPORT_F_END 43
#ifndef VIRTIO_CONFIG_NO_LEGACY
/* Do we get callbacks when the ring is completely used, even if we've
@@ -120,4 +120,9 @@
*/
#define VIRTIO_F_ADMIN_VQ 41
+/*
+ * This feature indicates that the transport provides the SHM page size.
+ */
+#define VIRTIO_F_SHM_PAGE_SIZE 42
+
#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
Introduce VIRTIO_F_SHM_PAGE_SIZE, a feature bit which indicates that the transport provides the page size for SHM regions. Signed-off-by: Sergio Lopez <slp@redhat.com> --- drivers/virtio/virtio_pci_modern.c | 3 +++ drivers/virtio/virtio_ring.c | 2 ++ include/uapi/linux/virtio_config.h | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-)