config_tools: Use new HSM driver device node

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
Shuo A Liu
2021-07-02 12:03:11 +08:00
committed by wenlingz
parent b218544872
commit 1bccfab3b6
11 changed files with 11 additions and 41 deletions

View File

@@ -89,14 +89,6 @@ def off_line_cpus(args, vmid, uos_type, config):
key = "scenario config error"
launch_cfg_lib.ERR_LIST[key] = "No available cpu to offline and pass it to vm {}".format(vmid)
print('offline_path="/sys/class/vhm/acrn_vhm"', file=config)
print("", file=config)
print("# Check the device file of /dev/acrn_hsm to determine the offline_path", file=config)
print('if [ -e "/dev/acrn_hsm" ]; then', file=config)
print('offline_path="/sys/class/acrn/acrn_hsm"', file=config)
print('fi', file=config)
print("", file=config)
print("# offline pinned vCPUs from SOS before launch UOS", file=config)
print('cpu_path="/sys/devices/system/cpu"', file=config)
print("for i in `ls ${cpu_path}`; do", file=config)
@@ -114,7 +106,7 @@ def off_line_cpus(args, vmid, uos_type, config):
print(" echo 0 > ${cpu_path}/$i/online", file=config)
print(" online=`cat ${cpu_path}/$i/online`", file=config)
print(" done", file=config)
print(" echo $idx > ${offline_path}/offline_cpu", file=config)
print(" echo $idx > /sys/devices/virtual/misc/acrn_hsm/remove_cpu", file=config)
print(" fi", file=config)
print(" fi", file=config)
print(" done", file=config)