Date: Tue, 19 Jun 2012 02:40:44 -0500 (CDT) From: Bryan Venteicher <bryanv@daemoninthecloset.org> To: freebsd-scsi@freebsd.org Cc: freebsd-virtualization@freebsd.org Subject: Re: [CFT] VirtIO SCSI Driver Message-ID: <1449819169.793.1340091643925.JavaMail.root@sage.daemoninthecloset.org> In-Reply-To: <608701174.2086.1339136958852.JavaMail.root@sage.daemoninthecloset.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, ----- Original Message ----- > From: "Bryan Venteicher" <bryanv@daemoninthecloset.org> > To: freebsd-scsi@freebsd.org > Cc: freebsd-virtualization@freebsd.org > Sent: Friday, June 8, 2012 1:29:18 AM > Subject: [CFT] VirtIO SCSI Driver > > Hi, > > VirtIO SCSI is a virtualized HBA that offers a couple of advantages > over the existing VirtIO block disk devices. Instead of having a > vtbdX disk, familiar daX and cdX devices are created like from other > SCSI drivers. A single HBA is able to support multiple devices unlike > the VirtIO block where there is one disk per PCI device. And SCSI > devices from the host are able to be passthrough to the guest. > A second patch is available at: www.daemoninthecloset.org/~bryanv/patches/freebsd/freebsd_virtio_scsi_2.patch Most of the changes are just cleanup; the only noteworthy fix is that CAM_SCSI_STATUS_ERROR is now reported correctly. With a QEMU patch provided by the VirtIO SCSI author, bus reset now works. I hope the patch is committed soon upstream to QEMU. As I mentioned in my previous email, you need a QEMU with VirtIO SCSI support. You can check if your QEMU has the support by: $ qemu -device ? and looking for a line like: name "virtio-scsi-pci", bus PCI VirtIO SCSI should be supported by QEMU 1.1 or later. If your distribution does not provide a new enough QEMU, you'll need to compile from source. You'll then need to have QEMU create a VirtIO SCSI disk for the guest. The CLI sugar to do this is a bit ugly, but will look like: -drive file=/vm_images/vtscsi-2.img,if=none,id=drive-scsi0-0-0 \ -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x6 \ -device scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0 AFAIK, this really isn't documented anywhere (the QEMU man page isn't at all helpful) and took a bit of guessing when I was first getting started with it. Bryan > > Should apply cleanly to any recent -current, and probably to a > -stable > with minimal work. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1449819169.793.1340091643925.JavaMail.root>