Re: [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-18 Thread Kevin Wolf
Am 18.04.2019 um 13:01 hat Paolo Bonzini geschrieben: > On 18/04/19 12:47, Kevin Wolf wrote: > >> This is acually only an issue with kernels prior to 4.5, so it should be > >> fixed downstream instead. > > > > I don't think that upstream QEMU has kernels > 4.5 as an official > > requirement,

Re: [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-18 Thread Paolo Bonzini
On 18/04/19 12:47, Kevin Wolf wrote: >> This is acually only an issue with kernels prior to 4.5, so it should be >> fixed downstream instead. > > I don't think that upstream QEMU has kernels > 4.5 as an official > requirement, though? We try to be compatible with quite old libs, so we > should

Re: [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-18 Thread Kevin Wolf
Am 18.04.2019 um 11:48 hat Paolo Bonzini geschrieben: > On 17/04/19 14:30, Stefan Hajnoczi wrote: > > On Wed, Apr 17, 2019 at 12:54 PM Paolo Bonzini 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]).

Re: [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-18 Thread Paolo Bonzini
On 17/04/19 14:30, Stefan Hajnoczi wrote: > On Wed, Apr 17, 2019 at 12:54 PM Paolo Bonzini 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

Re: [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-17 Thread Stefan Hajnoczi
On Wed, Apr 17, 2019 at 12:54 PM Paolo Bonzini 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

[Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits

2019-04-17 Thread Paolo Bonzini
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