Hi folks ! There's an odd problem I've encountered with my scsi host (basically an powerpc "vscsi" compatible with IBM PAPR).
When using /dev/sg (ie, scsi-generic), there seem to be no way I can find to retrieve the underlying driver's max request transfer size. This can normally be obtained with the BLKSECTGET ioctl under Linux (I'm not familiar with other OSes here). However, this is a bit buggy as well, ie, afaik, this doesn't work with 32-bit binaries on 64-bit kernels (the compat ioctl doesn't seem to work on /dev/sg). For now, qemu doesn't pass that from its bdev layer, which means that scsi-generic doesn't pass it to its own "upper" layer neither. What that means is two fold I suppose: - For real SCSI HBAs, how do you limit the transfer size anyways ? You can't start breaking up user requests without taking risks with tags etc... - For vscsi, I can expose the limit I want via the SRP interface, but scsi-generic doesn't tell me what it is :-) This is a real problem in practice. IE. the USB CD-ROM on this POWER7 blade limits transfers to 0x1e000 bytes for example and the Linux "sr" driver on the guest is going to try to give me bigger requests than that if I don't start limiting them, which will cause all sort of errors. Cheers, Ben.