]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 347033:
authorjhb <jhb@FreeBSD.org>
Wed, 29 May 2019 23:11:07 +0000 (23:11 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 29 May 2019 23:11:07 +0000 (23:11 +0000)
commite92d7e7e2db67b607e3aedde21cf1e738ee2ec70
tree74b03bdbe68e3837e4e8a371cefbb811d2f3f106
parentd7054e06982255a0b470373b4d1039f43c6c3d31
MFC 347033:
Increase the VirtIO segment count to support modern Windows guests.

The Windows virtio driver ignores the advertized seg_max field and
assumes the host can accept up to 67 segments in indirect descriptors,
triggering an assert in the bhyve process.

This brings back r282922 but with a couple of changes:
- It raises the block interface segment limit to 128 instead of 67.
- Linux's virtio driver assumes that the segment limit is no
  larger than the ring size.  To avoid breaking Linux guests,
  raise the VirtIO ring size to 128, and cap the VirtIO segment
  limit at ring size - 2 (effectively 126).

Approved by: re (gjb)
usr.sbin/bhyve/block_if.c
usr.sbin/bhyve/block_if.h
usr.sbin/bhyve/pci_virtio_block.c