Skip to contentSkip to conversation

hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

PATCH Superseded Andy Pei 2 participants 3 messages Nov 26, 2021 – Jan 3, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Andy Pei

author
#0 lore raw

PATCH 1/1 hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX virtio blk device to avoid guest DMA request size is too large to exceed hardware spec.

---
 hw/block/vhost-user-blk.c | 1 +
 1 file changed, 1 insertion(+)
hw/block/vhost-user-blk.c +1 -0
index ba13cb8..eb1264a 100644
@@ -252,6 +252,7 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice *vdev,
     VHostUserBlk *s = VHOST_USER_BLK(vdev);
 
     /* Turn on pre-defined features */
+    virtio_add_feature(&features, VIRTIO_BLK_F_SIZE_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_SEG_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY);
     virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY);
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw

Just a commit message nit. Otherwise I'm happy with this. OFC should not be queued for 6.2.

Quoted 2 lines · Andy Pei

Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX virtio blk device to avoid guest DMA request size is too large to exceed hardware spec.

Grammar here. Should be something like "...DMA request sizes which are to large for the hardware spec".

Quoted 2 lines
Quoted 19 lines
---
 hw/block/vhost-user-blk.c | 1 +
 1 file changed, 1 insertion(+)
hw/block/vhost-user-blk.c +1 -0
index ba13cb8..eb1264a 100644
@@ -252,6 +252,7 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice *vdev,
     VHostUserBlk *s = VHOST_USER_BLK(vdev);
 
     /* Turn on pre-defined features */
+    virtio_add_feature(&features, VIRTIO_BLK_F_SIZE_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_SEG_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY);
     virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY);
Signature · 1 line
1.8.3.1
author Acked-by Raphael Norwitz
#2 lore raw

Hi Raphael,

Thanks for your reply.
I will fix the grammar mistake in V2.

-----Original Message-----
From: Raphael Norwitz <[email protected]>
Sent: Tuesday, November 30, 2021 5:58 AM
To: Pei, Andy <[email protected]>
Cc: [email protected]; [email protected]; Liu, Changpeng <[email protected]>; Raphael Norwitz <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

Just a commit message nit. Otherwise I'm happy with this. OFC should not be queued for 6.2.

Quoted 2 lines · Andy Pei

Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX virtio blk device to avoid guest DMA request size is too large to exceed hardware spec.

Grammar here. Should be something like "...DMA request sizes which are to large for the hardware spec".

Quoted 2 lines
Quoted 19 lines
---
 hw/block/vhost-user-blk.c | 1 +
 1 file changed, 1 insertion(+)
hw/block/vhost-user-blk.c +1 -1
index ba13cb8..eb1264a 100644
@@ -252,6 +252,7 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice *vdev,
     VHostUserBlk *s = VHOST_USER_BLK(vdev);
 
     /* Turn on pre-defined features */
+    virtio_add_feature(&features, VIRTIO_BLK_F_SIZE_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_SEG_MAX);
     virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY);
     virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY);
--

1.8.3.1