forked from autotest/tp-qemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request autotest#2594 from peixiu/cpu_hotplug_workaround
cpu_device_hotpluggable: Add a workaround for win2016 guest
- Loading branch information
Showing
9 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
""" | ||
windows workaround functions. | ||
""" | ||
import logging | ||
import re | ||
|
||
from virttest import error_context | ||
from virttest import utils_misc | ||
|
||
|
||
@error_context.context_aware | ||
def modify_driver(params, session): | ||
""" | ||
Add a workaround for win2016 guest to solve the issue that | ||
"HID Button over Interrupt Driver" does occupy hot-added cpu's driver, | ||
cause the system cannot detected new added cpu, need modify the driver. | ||
issue details please refer to: | ||
https://support.huawei.com/enterprise/zh/doc/EDOC1100034211/5ba99a60. | ||
""" | ||
devcon_path = utils_misc.set_winutils_letter(session, | ||
params["devcon_path"]) | ||
dev_hwid = params["dev_hwid"] | ||
chk_cmd = '%s find %s' % (devcon_path, dev_hwid) | ||
chk_pat = r'ACPI\\ACPI0010.*\: Generic Bus' | ||
if not re.search(chk_pat, session.cmd(chk_cmd)): | ||
error_context.context("Install 'HID Button over Interrupt Driver' " | ||
"to Generic Bus", logging.info) | ||
inst_cmd = '%s install %s %s' % (devcon_path, | ||
params["driver_inf_file"], | ||
dev_hwid) | ||
if session.cmd_status(inst_cmd, timeout=60): | ||
logging.error("'HID Button over Interrupt Driver' modify failed") | ||
logging.info("'HID Button over Interrupt Driver' modify finished") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters