From 3c607107a840b46334c928807a0a7845f1b379e6 Mon Sep 17 00:00:00 2001 From: Wu Zhou Date: Sun, 23 Apr 2023 16:19:24 +0800 Subject: [PATCH] config_tools: set VHWP flag for VMs who own pCPUs Set GUEST_FLAG_VHWP guest flag for VMs who own pCPUs. Windows does not manage CPU frequency in virtualized environment, so this flag is not set for waag. Platforms without HWP capability should not have this flag either. Tracked-On: #8414 Signed-off-by: Wu Zhou Reviewed-by: Junjie Mao --- misc/config_tools/static_allocators/guest_flags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/config_tools/static_allocators/guest_flags.py b/misc/config_tools/static_allocators/guest_flags.py index 97f11302d..d654a3547 100644 --- a/misc/config_tools/static_allocators/guest_flags.py +++ b/misc/config_tools/static_allocators/guest_flags.py @@ -38,3 +38,5 @@ def fn(board_etree, scenario_etree, allocation_etree): if vm_node.xpath(policy.condition): acrn_config_utilities.append_node("./guest_flags/guest_flag", str(policy.guest_flag), allocation_vm_node) acrn_config_utilities.append_node("./guest_flags/guest_flag",'GUEST_FLAG_STATIC_VM', allocation_vm_node) + if board_etree.xpath("//capability[@id = 'hwp_supported']") and get_node(".//own_pcpu/text()", vm_node) == "y" and get_node(".//os_type/text()", vm_node) != "Windows OS": + acrn_config_utilities.append_node("./guest_flags/guest_flag", 'GUEST_FLAG_VHWP', allocation_vm_node)