DevStack¶
pci-sim is built into the Cyborg DevStack plugin. No separate
enable_plugin line is needed — enabling Cyborg is sufficient:
enable_plugin cyborg https://opendev.org/openstack/cyborg
PCI_SIM_CONFIGURE_NOVA_PCI=True
PCI_SIM_CONFIGURE_CYBORG_PCI=True
A ready-to-use sample configuration is provided in the Cyborg repository at
devstack/local-conf.pci-sim.sample.
Plugin settings¶
ENABLE_PCI_SIMMaster switch. Set to
Falseto skip all pci-sim phases (build, load, configuration, and test-resource creation). Defaults toFalse.PCI_SIM_BUILDBuild and install the module during the DevStack
installphase. Defaults toTrue.PCI_SIM_LOADLoad
fake_pci_sriovafter building it. Defaults toTrue.PCI_SIM_ALLOW_UNSAFE_INTERRUPTSAllow VFIO on hosts without interrupt remapping support by setting
vfio_iommu_type1.allow_unsafe_interruptsbefore probing the fake VFs. Defaults toTruefor nested/devstack test environments.PCI_SIM_NUM_PFSNumber of fake SR-IOV physical functions to create. Defaults to
2.PCI_SIM_NUM_VFSNumber of virtual functions to enable on each fake PF. Defaults to
4. The current module supports0through7VFs per PF.PCI_SIM_CONFIGURE_NOVA_PCIConfigure Nova to consume pci-sim VFs directly using Nova’s
[pci]device_specandaliasoptions. Defaults toFalse. Nova entries are generated by exact VF address and usemanaged=\"no\". The plugin updates both/etc/nova/nova.confand, when present, DevStack’s compute service config/etc/nova/nova-cpu.conf.PCI_SIM_CONFIGURE_CYBORG_PCIConfigure Cyborg’s generic
pci_driverto manage pci-sim VFs using Cyborg’s[agent] enabled_driversand[pci] passthrough_whitelistoptions. Defaults toFalse. If both Nova and Cyborg configuration are enabled, the plugin assigns whole PFs in round-robin order: all VFs from PF0 to Nova, all VFs from PF1 to Cyborg, and so on.PCI_SIM_NOVA_PCI_IN_PLACEMENTWhen Nova PCI configuration is enabled, configure
[pci] report_in_placementand[filter_scheduler] pci_in_placement. Defaults toTrue.PCI_SIM_CREATE_TEST_FLAVORSCreate convenience test resources during
stack/test-config. Defaults toTrue. When Nova PCI configuration is enabled, the plugin creates a flavor named byPCI_SIM_NOVA_FLAVOR_NAMEwithpci_passthrough:alias. When Cyborg PCI configuration is enabled, the plugin creates a Cyborg device profile named byPCI_SIM_CYBORG_DEVICE_PROFILE_NAMEand a flavor named byPCI_SIM_CYBORG_FLAVOR_NAMEwithaccel:device_profile.PCI_SIM_MODULE_ARGSOptional extra arguments passed to
modprobe fake_pci_sriovwhenPCI_SIM_LOAD=True. Do not includenum_pfshere; usePCI_SIM_NUM_PFSinstead.