summary refs log tree commit diff
path: root/x86_64
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-10-23 13:55:37 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-08 20:35:18 +0000
commit2b109386e7676333a53b1511c12dce3a4ff329e3 (patch)
treeaeca2fb84e1c452117ea79ee03ace897ebd81592 /x86_64
parentf68a2940f4734687fba96380d1111bfae2c43ffa (diff)
downloadcrosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar.gz
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar.bz2
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar.lz
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar.xz
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.tar.zst
crosvm-2b109386e7676333a53b1511c12dce3a4ff329e3.zip
devices: virtio: block: advertise seg_max
The virtio-blk configuration space has a `seg_max` field that lets the
device inform the driver of the maximum number of segments allowed
within a single request.  The Linux virtio block driver assumes that if
the corresponding feature (VIRTIO_BLK_F_SEG_MAX) is not advertised, then
only one segment can be used.

Add a segment limit based on sysconf(_SC_IOV_MAX) to allow the Linux
block stack to make use of multiple segments in a single request, which
will get translated into a single readv/writev call in the crosvm block
device.

BUG=None
TEST=strace crosvm virtio-blk process and note preadv with iov_cnt > 1

Change-Id: Ia14ebebb85daa21e2d43437bb74886f32e6e8187
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1876806
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'x86_64')
0 files changed, 0 insertions, 0 deletions