mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
acrn-config: parse KATA VM count number with vm_type 'KATA_VM'
Parse KATA VM count number from scenario config with vm_type 'KATA_VM' and Remove MAX_KATA_VM_NUM from scenario config xmls. Tracked-On: #4641 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
@@ -16,7 +16,6 @@ SCHEDULER_TYPE = ['SCHED_NOOP', 'SCHED_IORR', 'SCHED_BVT']
|
||||
RANGE_DB = {
|
||||
'LOG_LEVEL':{'min':0,'max':6},
|
||||
'LOG_DESTINATION_BITMAP':{'min':0,'max':7},
|
||||
'KATA_VM_NUM':{'min':0,'max':1},
|
||||
'EMULATED_MMIO_REGIONS':{'min':0,'max':128},
|
||||
'PT_IRQ_ENTRIES':{'min':0,'max':256},
|
||||
'IOAPIC_NUM':{'min':1,'max':10},
|
||||
|
||||
@@ -126,6 +126,7 @@ def load_vm_check(load_vms, item):
|
||||
:param item: vm name item in xml
|
||||
:return: None
|
||||
"""
|
||||
global KATA_VM_COUNT
|
||||
sos_vm_ids = []
|
||||
pre_vm_ids = []
|
||||
post_vm_ids = []
|
||||
@@ -147,7 +148,7 @@ def load_vm_check(load_vms, item):
|
||||
if "PRE_LAUNCHED_VM" == VM_DB[load_str]['load_type']:
|
||||
pre_vm_ids.append(order_i)
|
||||
|
||||
if "POST_LAUNCHED_VM" == VM_DB[load_str]['load_type']:
|
||||
if "POST_STD_VM" == load_str:
|
||||
post_vm_ids.append(order_i)
|
||||
|
||||
if "KATA_VM" == load_str:
|
||||
@@ -156,6 +157,7 @@ def load_vm_check(load_vms, item):
|
||||
if "POST_RT_VM" == load_str:
|
||||
rt_vm_ids.append(order_i)
|
||||
|
||||
KATA_VM_COUNT = len(kata_vm_ids)
|
||||
if len(kata_vm_ids) > len(UUID_DB["KATA_VM"]):
|
||||
key = "vm:id={},{}".format(kata_vm_ids[0], item)
|
||||
ERR_LIST[key] = "KATA VM number should not be greater than {}".format(len(UUID_DB["KATA_VM"]))
|
||||
|
||||
Reference in New Issue
Block a user