bhyve: implement NVMe device support

NVMe devices in bhyve are modeled this way:

 -s $pciaddr,nvme,devpath[,opts]

devpath can be a path to the image or the block device. It also can be
"ram=size_in_MiB", but this is not covered by this series.

There could be only a single device per PCI address.

Optional configuration options (such as max number of queues, concurrent
I/O requests, etc) are also not covered by this series.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Roman Bogorodskiy authored and Jiri Denemark committed 2025-10-29 11:45:42 +01:00
1 parent 1ab27a5b96
commit 79e46b1698
11 files changed
+127 -6

No files matched your search

@@ -0,0 +1,9 @@
bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,nvme,/tmp/freebsd.img \
bhyve
@@ -0,0 +1,4 @@
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve
@@ -0,0 +1,16 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
</os>
<devices>
<disk type='file'>
<driver name='file' type='raw'/>
<source file='/tmp/freebsd.img'/>
<target dev='nvme0n1' bus='nvme'/>
</disk>
</devices>
</domain>