From e68d66341e6811b7f8f10e955bebb4b0ebd55d66 Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Tue, 14 Sep 2021 19:07:09 +0800 Subject: [PATCH] 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 --- misc/config_tools/launch_config/pt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config_tools/launch_config/pt.py b/misc/config_tools/launch_config/pt.py index 25c131414..fa0c1fd38 100644 --- a/misc/config_tools/launch_config/pt.py +++ b/misc/config_tools/launch_config/pt.py @@ -206,6 +206,7 @@ def gen_pt(names, dm, sel, vmid, config): cap_pt = launch_cfg_lib.get_pt_dev() uos_type = names['uos_types'][vmid] + print("modprobe pci_stub", file=config) # pass thru GPU if dm['gvt_args'][vmid] == "gvtd": 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: return - print("modprobe pci_stub", file=config) for pt_dev in cap_pt: if pt_dev not in MEDIA_DEV: pass_through_dev(sel, pt_dev, vmid, config)