Page MenuHomeFreeBSD

bhyve/virtio-scsi: support for multiple targets
Needs ReviewPublic

Authored by rosenfeld_grumpf.hope-2000.org on Mon, Oct 20, 5:46 PM.

Details

Reviewers
jhb
corvink
markj
Group Reviewers
bhyve
Summary

Currently, virtio-scsi supports only one target with 16383 LUNs, which
fits nicely with what CTL provides. It would be useful to support more
than that, multiple targets each with 16383 LUNs.

While this can be useful with CTL by attaching each target to another
CTL target port, this will be necessary to support SCSI passthrough.

The new syntax for configuring targets will look like this:

-s X,virtio-scsi,target=/dev/foo,target=/dev/bar,target=/dev/baz

This will create the following configuration nodes:

pci.0.X.0.device=virtio-scsi
pci.0.X.0.target.0=/dev/foo
pci.0.X.0.target.1=/dev/bar
pci.0.X.0.target.2=/dev/baz

The existing configuration syntax is still understood for compatibility:

(1) -s X,virtio-scsi
(2) -s X,virtio-scsi,/dev/foo
(3) -s X,virtio-scsi,dev=/dev/foo

This will create the following configuration nodes:

pci.0.X.0.device=virtio-scsi (1, 2, 3)
pci.0.X.0.target.0=/dev/cam/ctl (1)
pci.0.X.0.target.0=/dev/foo (2, 3)

This is currently also under review in illumos: https://code.illumos.org/c/illumos-gate/+/4423

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67942
Build 64825: arc lint + arc unit