On Tue, May 18, 2021 at 04:04:15PM +0100, Stefan Hajnoczi wrote: > + /* Prevent integer overflows and excessive blk-mq req cmd_size */ > + sg_elems = min_t(u32, sg_elems, SG_MAX_SEGMENTS); Please pick your own constant here instead of abusing some kernel implementation detail (that is fairly SCSI specific to start with). It might be useful to also document such limits, even if just advisory, in the virtio spec.