mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
bhyve: implement PCI address allocation
Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number of devices.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -A -I -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='hda' bus='sata'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='hda' bus='sata'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img \
|
||||
-s 31,lpc -l com1,/dev/nmdm0A bhyve
|
||||
-s 1,lpc -l com1,/dev/nmdm0A bhyve
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='hda' bus='sata'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
<console type='nmdm'>
|
||||
<source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:22:ee:11 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='hda' bus='sata'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address="52:54:00:22:ee:11"/>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img \
|
||||
-s 31,lpc -l com1,/dev/nmdm0A bhyve
|
||||
-s 1,lpc -l com1,/dev/nmdm0A bhyve
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
<driver name='file' type='raw'/>
|
||||
<source file='/tmp/freebsd.img'/>
|
||||
<target dev='hda' bus='sata'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
<serial type='nmdm'>
|
||||
<source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
|
||||
|
||||
Reference in New Issue
Block a user