On Sat, Feb 22, 2020 at 01:38:53AM -0500, Ryan Moeller wrote:
Handle PCI passthrough and virtio-scsi using hostdev devices.
Example PCI passthrough:
domain xml snippet
```
<memoryBacking>
<locked/>
</memoryBacking>
<devices>
<hostdev mode='subsystem' type='pci'>
<source>
<address domain='0x0000' bus='0x06' slot='0x02'
function='0x00'/>
</source>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x00'/>
</hostdev>
</devices>
```
loader.conf snippet
```
vmm_load="YES"
pptdevs="6/2/0"
```
Example SCSI passthrough:
domain xml snippet
```
<hostdev mode='subsystem' type='scsi_ctl' model='virtio'>
<source protocol='ioctl' pp='5' vp='0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x00'/>
</hostdev>
```
ctl.conf snippet
```
portal-group "pg0" {
discovery-auth-group "no-authentication"
listen "127.0.0.1"
}
target iqn.2020-01.com.example:target0 {
auth-group "no-authentication"
portal-group "pg0"
port ioctl/5/0
lun 0 { path "/dev/zvol/storage/lun0" }
lun 1 { path "/dev/zvol/storage/lun1" }
lun 2 { path "/dev/zvol/storage/lun2" }
lun 3 { path "/dev/zvol/storage/lun3" }
}
```
Signed-off-by: Ryan Moeller <ryan(a)iXsystems.com>
---
'make syntax-check' complains about the lack of newlines at the end of
.arg files, but given that it barely works on FreeBSD, that's not
surprising :)
More importantnly, virschematest fails.
'gmake check' should pass after every commit
Jano