if driver reads data larger than VIRTIO_BLK_F_SIZE_MAX, it will cause some issue to the DMA engine. So add VIRTIO_BLK_F_SIZE_MAX feature support, when upper software wants to read data larger than VIRTIO_BLK_F_SIZE_MAX, virtio-blk driver split one large request into multiple smaller ones.
Andy Pei (3): virtio-blk: add feature VIRTIO_BLK_F_SIZE_MAX and VIRTIO_BLK_F_SEG_MAX virtio-blk: abstract a function named virtio_blk_op_one_segment to handle r/w request virtio-blk.: split large IO according to size_max
src/block.h | 2 + src/hw/virtio-blk.c | 132 +++++++++++++++++++++++++++++++++++++++++++++------- src/hw/virtio-blk.h | 3 ++ 3 files changed, 120 insertions(+), 17 deletions(-)