> On Wed, 11 Jul 2012, Ted Unangst wrote:
> > We are consolidating and reducing the number of disk types.  I think
> > this would be better if it attached as scsi disks, which is what all
> > the cool virtual disks do these days.
> 
> There is a virtio-scsi device, too, but this is only supported in very 
> recent versions of qemu. To attach the simpler virtio-block device as 
> scsi, the driver would have to emulate the scsi commands. Is there some 
> generic infrastructure to do that?

No.  There is no generic infrastructure.

However, the code from each driver that does this is often copied from
another driver, and then carefully modified in each individual new driver
to be nicely and neatly integrated.

> Or which driver would you recommend to 
> take the emulation code from? sys/dev/ata/atascsi.c seems rather complex 
> (it is twice the size of sys/dev/pci/viod.c).

Probably from mpi(4).

Reply via email to