docs: Update the relevant documentation

Some of the documentation references PCI segment ID. For those documents
add a mention of the new PCI device ID.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-04-04 12:49:53 -07:00
parent 5aa3692c6d
commit b4723999f8
2 changed files with 23 additions and 6 deletions

View File

@@ -90,8 +90,9 @@ feature is enabled by default.
For all virtio devices listed below, only `virtio-pci` transport layer is
supported. Cloud Hypervisor supports multiple PCI segments, and users can
append `,pci_segment=<PCI_segment_number>` to the device flag in the Cloud
Hypervisor command line to assign devices to a specific PCI segment.
append `,pci_segment=<PCI_segment_number>` or `,pci_device_id=<PCI_device_ID>` to
the device flag in the Cloud Hypervisor command line to assign devices to a specific
PCI segment or into a specific device slot.
### virtio-block

View File

@@ -32,11 +32,12 @@ struct VdpaConfig {
iommu: bool,
id: Option<String>,
pci_segment: u16,
pci_device_id: Option<u8>
}
```
```
--vdpa <vdpa> vDPA device "path=<device_path>,num_queues=<number_of_queues>,iommu=on|off,id=<device_id>,pci_segment=<segment_id>"
--vdpa <vdpa> vDPA device "path=<device_path>,num_queues=<number_of_queues>,iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>"
```
### `path`
@@ -96,6 +97,21 @@ _Example_
--vdpa path=/dev/vhost-vdpa-0,pci_segment=1
```
### `pci_device_id`
PCI device ID to assign to the vDPA device on its PCI bus.
This parameter is optional. If not specified, a device ID is automatically
allocated.
Value is an unsigned integer in the range 1-31.
_Example_
```
--vdpa path=/dev/vhost-vdpa-0,pci_device_id=5
```
## Example with vDPA block simulator
The vDPA framework provides a simulator with both `virtio-block` and