acrn-config: add support Pre-launhced RT for acrn-config

1.Add UUID for Pre-launched RT VM.
2.Add hybrid_rt.xml for whl-ipc-i7/i5 and also add template Pre-Launched
RT sample xml.
3.Refine sanity check for load_kern_addr/entry.

Tracked-On: #5081
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu
2020-07-20 17:59:50 +08:00
committed by wenlingz
parent 03fdb297d6
commit 175b20770a
7 changed files with 580 additions and 6 deletions

View File

@@ -46,6 +46,7 @@ UUID_DB = {
'38158821-5208-4005-b72a-8a609e4190d0', 'a6750180-f87a-48d2-91d9-4e7f62b6519e', 'd1816e4a-a9bb-4cb4-a066-3f1a8a5ce73f'],
'POST_RT_VM':['495ae2e5-2603-4d64-af76-d4bc5a8ec0e5'],
'KATA_VM':['a7ada506-1ab0-4b6b-a0da-e513ca9b8c2f'],
'PRE_RT_VM':['b2a92bec-ca6b-11ea-b106-3716a8ba0bb9'],
}
VM_DB = {
@@ -55,6 +56,7 @@ VM_DB = {
'POST_STD_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_STANDARD_VM', 'uuid':UUID_DB['POST_STD_VM']},
'POST_RT_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_RTVM', 'uuid':UUID_DB['POST_RT_VM']},
'KATA_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_STANDARD_VM', 'uuid':UUID_DB['KATA_VM']},
'PRE_RT_VM':{'load_type':'PRE_LAUNCHED_VM', 'severity':'SEVERITY_RTVM', 'uuid':UUID_DB['PRE_RT_VM']},
}
LOAD_VM_TYPE = list(VM_DB.keys())
@@ -179,9 +181,10 @@ def load_vm_check(load_vms, item):
ERR_LIST[key] = "POST Standard vm number should not be greater than {}".format(len(UUID_DB["POST_STD_VM"]))
return
if len(pre_vm_ids) > len(UUID_DB["PRE_STD_VM"]):
max_pre_launch_vms = len(UUID_DB["PRE_STD_VM"]) + len(UUID_DB["SAFETY_VM"]) + len(UUID_DB["PRE_RT_VM"])
if len(pre_vm_ids) > max_pre_launch_vms:
key = "vm:id={},{}".format(pre_vm_ids[0], item)
ERR_LIST[key] = "PRE Standard vm number should not be greater than {}".format(len(UUID_DB["PRE_STD_VM"]))
ERR_LIST[key] = "PRE Launched VM number should not be greater than {}".format(max_pre_launch_vms)
return
if post_vm_ids and sos_vm_ids:
@@ -381,7 +384,7 @@ def os_kern_args_check(id_kern_args_dic, prime_item, item):
ERR_LIST[key] = "VM os config kernel service os should be SOS_VM_BOOTARGS"
def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item):
def os_kern_load_addr_check(kern_type, id_kern_load_addr_dic, prime_item, item):
"""
Check os kernel load address
:param prime_item: the prime item in xml file
@@ -390,6 +393,8 @@ def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item):
"""
for id_key, kern_load_addr in id_kern_load_addr_dic.items():
if kern_type[id_key] != 'KERNEL_ZEPHYR':
continue
if not kern_load_addr:
key = "vm:id={},{},{}".format(id_key, prime_item, item)
@@ -401,7 +406,7 @@ def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item):
ERR_LIST[key] = "VM os config kernel load address should Hex format"
def os_kern_entry_addr_check(id_kern_entry_addr_dic, prime_item, item):
def os_kern_entry_addr_check(kern_type, id_kern_entry_addr_dic, prime_item, item):
"""
Check os kernel entry address
:param prime_item: the prime item in xml file
@@ -410,6 +415,8 @@ def os_kern_entry_addr_check(id_kern_entry_addr_dic, prime_item, item):
"""
for id_key, kern_entry_addr in id_kern_entry_addr_dic.items():
if kern_type[id_key] != 'KERNEL_ZEPHYR':
continue
if not kern_entry_addr:
key = "vm:id={},{},{}".format(id_key, prime_item, item)