HomeFreeBSD

MFC r349285

Description

MFC r349285

VirtIO SCSI: validate seg_max on attach

Until head r349278 (stable/12 r349690), 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
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20703

Details

Provenance
vangyzenAuthored on
Reviewer
bryanv
Differential Revision
D20703: VirtIO SCSI: validate seg_max from hypervisor
Parents
rS349692: MFC r348834
Branches
Unknown
Tags
Unknown