freebsd-skq/sys/dev/virtio/scsi
vangyzen e18b1f330a VirtIO SCSI: validate seg_max on attach
Until r349278, bhyve presented a seg_max to the guest that was too large.
Detect this case and clamp it to the virtqueue size.  Otherwise, we would
fail the "too many segments to enqueue" assertion in virtqueue_enqueue().

I hit this by running a guest with a MAXPHYS of 256 KB.

Reviewed by:	bryanv cem
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20703
2019-06-22 01:20:45 +00:00
..
virtio_scsi.c VirtIO SCSI: validate seg_max on attach 2019-06-22 01:20:45 +00:00
virtio_scsi.h
virtio_scsivar.h