On Wed, Apr 17, 2019 at 12:54 PM Paolo Bonzini <pbonz...@redhat.com> wrote: > Linux places a limit of UIO_MAXIOV pages on SG_IO ioctls (and if the limit > is exceeded, a confusing ENOMEM error is returned[1]). Prevent the guest > from exceeding these limits, by capping the maximum transfer length to > that value in the block limits VPD page. > > [1] Oh well, at least it was easier to follow the kernel source knowing > it had to end as ENOMEM... > > Cc: qemu-sta...@nongnu.org > Cc: qemu-block@nongnu.org > Cc: Stefan Hajnoczi <stefa...@redhat.com> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > hw/scsi/scsi-generic.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>