config_tools: adjust the execution order of pci_stub command
The execution order of the "modprobe pci_stub" command is erroneous in the launch script generation logic. The "modprobe pci_stub" command should be executed before unbinding passthru devices, so we adjust the command excution order. Tracked-On: #6565 Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
This commit is contained in:
parent
d1f139a51e
commit
e68d66341e
|
@ -206,6 +206,7 @@ def gen_pt(names, dm, sel, vmid, config):
|
||||||
cap_pt = launch_cfg_lib.get_pt_dev()
|
cap_pt = launch_cfg_lib.get_pt_dev()
|
||||||
uos_type = names['uos_types'][vmid]
|
uos_type = names['uos_types'][vmid]
|
||||||
|
|
||||||
|
print("modprobe pci_stub", file=config)
|
||||||
# pass thru GPU
|
# pass thru GPU
|
||||||
if dm['gvt_args'][vmid] == "gvtd":
|
if dm['gvt_args'][vmid] == "gvtd":
|
||||||
print('echo ${passthru_vpid["gpu"]} > /sys/bus/pci/drivers/pci-stub/new_id', file=config)
|
print('echo ${passthru_vpid["gpu"]} > /sys/bus/pci/drivers/pci-stub/new_id', file=config)
|
||||||
|
@ -218,7 +219,6 @@ def gen_pt(names, dm, sel, vmid, config):
|
||||||
if pt_none:
|
if pt_none:
|
||||||
return
|
return
|
||||||
|
|
||||||
print("modprobe pci_stub", file=config)
|
|
||||||
for pt_dev in cap_pt:
|
for pt_dev in cap_pt:
|
||||||
if pt_dev not in MEDIA_DEV:
|
if pt_dev not in MEDIA_DEV:
|
||||||
pass_through_dev(sel, pt_dev, vmid, config)
|
pass_through_dev(sel, pt_dev, vmid, config)
|
||||||
|
|
Loading…
Reference in New Issue