Ensure parameters are set for vfio-pci
If a pci-sriov VF interface is configured prior to configuring a host
device to use vfio-pci PF driver, the reload of vfio-pci module with
extra required parameter does not set the parameters because the module
is already loaded.
The fix is to set the parameters (enable_sriov and disable_idle_d3) by
writing to the parameters files in sysfs after the module is loaded.
Test plan:
PASS: With a pci-sriov VF interface provisioned, set a host device to
use vfio-pci PF driver. Ensure no puppet errors and unlock
successfully.
Closes-Bug: 2016698
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
Change-Id: I07425a333916fe5d05316baa33e82dd3d5b79699
This commit is contained in:
@@ -95,6 +95,14 @@ define platform::devices::sriov_bind (
|
||||
command => 'modprobe vfio-pci enable_sriov=1 disable_idle_d3=1',
|
||||
logoutput => true,
|
||||
}
|
||||
-> exec { "Ensure enable_sriov is set: ${title}":
|
||||
command => 'echo 1 > /sys/module/vfio_pci/parameters/enable_sriov',
|
||||
logoutput => true,
|
||||
}
|
||||
-> exec { "Ensure disable_idle_d3 is set: ${title}":
|
||||
command => 'echo 1 > /sys/module/vfio_pci/parameters/disable_idle_d3',
|
||||
logoutput => true,
|
||||
}
|
||||
-> exec { "sriov-bind-device: ${title}":
|
||||
command => template('platform/sriov.bind-device.erb'),
|
||||
logoutput => true,
|
||||
|
||||
Reference in New Issue
Block a user