[PATCH 14/16] Add hostdev handling for bhyve

Ján Tomko jtomko at redhat.com
Mon Feb 24 00:43:15 UTC 2020


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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200224/0c5e2dde/attachment-0001.sig>


More information about the libvir-list mailing list