diff --git a/doc/developer-guides/hld/hv-memmgt.rst b/doc/developer-guides/hld/hv-memmgt.rst index 83d40ce1d..404249bc6 100644 --- a/doc/developer-guides/hld/hv-memmgt.rst +++ b/doc/developer-guides/hld/hv-memmgt.rst @@ -413,7 +413,7 @@ Address Space Translation .. doxygenfunction:: gpa2hpa :project: Project ACRN -.. doxygenfunction:: sos_vm_hpa2gpa +.. doxygenfunction:: service_vm_hpa2gpa :project: Project ACRN EPT diff --git a/hypervisor/arch/x86/configs/pci_dev.c b/hypervisor/arch/x86/configs/pci_dev.c index d2dcab07a..504d689ab 100644 --- a/hypervisor/arch/x86/configs/pci_dev.c +++ b/hypervisor/arch/x86/configs/pci_dev.c @@ -59,7 +59,7 @@ struct acrn_vm_pci_dev_config *init_one_dev_config(struct pci_pdev *pdev) if (!is_allocated_to_prelaunched_vm(pdev)) { for (vmid = 0U; vmid < CONFIG_MAX_VM_NUM; vmid++) { vm_config = get_vm_config(vmid); - if (vm_config->load_order != SOS_VM) { + if (vm_config->load_order != SERVICE_VM) { continue; } diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 75ec4b976..5fffd9d48 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -96,7 +96,7 @@ bool is_paused_vm(const struct acrn_vm *vm) bool is_service_vm(const struct acrn_vm *vm) { - return (vm != NULL) && (get_vm_config(vm->vm_id)->load_order == SOS_VM); + return (vm != NULL) && (get_vm_config(vm->vm_id)->load_order == SERVICE_VM); } /** @@ -987,9 +987,9 @@ void launch_vms(uint16_t pcpu_id) for (vm_id = 0U; vm_id < CONFIG_MAX_VM_NUM; vm_id++) { vm_config = get_vm_config(vm_id); - if ((vm_config->load_order == SOS_VM) || (vm_config->load_order == PRE_LAUNCHED_VM)) { + if ((vm_config->load_order == SERVICE_VM) || (vm_config->load_order == PRE_LAUNCHED_VM)) { if (pcpu_id == get_configured_bsp_pcpu_id(vm_config)) { - if (vm_config->load_order == SOS_VM) { + if (vm_config->load_order == SERVICE_VM) { service_vm_ptr = &vm_array[vm_id]; } prepare_vm(vm_id, vm_config); diff --git a/hypervisor/boot/guest/vboot_info.c b/hypervisor/boot/guest/vboot_info.c index ea81c0a0d..cba4a7f84 100644 --- a/hypervisor/boot/guest/vboot_info.c +++ b/hypervisor/boot/guest/vboot_info.c @@ -89,7 +89,7 @@ static void init_vm_bootargs_info(struct acrn_vm *vm, const struct acrn_boot_inf vm->sw.bootargs_info.src_addr = &mod_cmdline[vm->vm_id][0]; } - if (vm_config->load_order == SOS_VM) { + if (vm_config->load_order == SERVICE_VM) { if (strncat_s((char *)vm->sw.bootargs_info.src_addr, MAX_BOOTARGS_SIZE, " ", 1U) == 0) { char seed_args[MAX_SEED_ARG_SIZE] = ""; diff --git a/hypervisor/dm/vpci/vpci.c b/hypervisor/dm/vpci/vpci.c index 8b9eed80c..275a1581c 100644 --- a/hypervisor/dm/vpci/vpci.c +++ b/hypervisor/dm/vpci/vpci.c @@ -140,7 +140,7 @@ static bool vpci_pio_cfgdata_read(struct acrn_vcpu *vcpu, uint16_t addr, size_t * @pre vcpu->vm != NULL * @pre vcpu->vm->vm_id < CONFIG_MAX_VM_NUM * @pre (get_vm_config(vcpu->vm->vm_id)->load_order == PRE_LAUNCHED_VM) - * || (get_vm_config(vcpu->vm->vm_id)->load_order == SOS_VM) + * || (get_vm_config(vcpu->vm->vm_id)->load_order == SERVICE_VM) * * @retval true on success. * @retval false. (ACRN will deliver this IO request to DM to handle for post-launched VM) @@ -225,7 +225,7 @@ int32_t init_vpci(struct acrn_vm *vm) vm_config = get_vm_config(vm->vm_id); /* virtual PCI MMCONFIG for Service VM is same with the physical value */ - if (vm_config->load_order == SOS_VM) { + if (vm_config->load_order == SERVICE_VM) { pci_mmcfg = get_mmcfg_region(); vm->vpci.pci_mmcfg = *pci_mmcfg; vm->vpci.res32.start = MMIO32_START; diff --git a/hypervisor/include/arch/x86/asm/vm_config.h b/hypervisor/include/arch/x86/asm/vm_config.h index 83d1d28f6..e5dcec111 100644 --- a/hypervisor/include/arch/x86/asm/vm_config.h +++ b/hypervisor/include/arch/x86/asm/vm_config.h @@ -37,7 +37,7 @@ #define MAX_MMIO_DEV_NUM 2U -#define CONFIG_SOS_VM .load_order = SOS_VM, \ +#define CONFIG_SERVICE_VM .load_order = SERVICE_VM, \ .uuid = SERVICE_VM_UUID, \ .severity = SEVERITY_SERVICE_VM diff --git a/hypervisor/include/public/acrn_common.h b/hypervisor/include/public/acrn_common.h index f30b7330e..d00974a51 100644 --- a/hypervisor/include/public/acrn_common.h +++ b/hypervisor/include/public/acrn_common.h @@ -211,8 +211,7 @@ struct acrn_pci_request { * | | | | * | | | - Fill in type, | * | | | addr, etc. | - * | | | - Pause User VM | - * | | | vCPU y | + * | | | - Pause User VM vCPU | * | | | - Set state to | * | | | PENDING (a) | * | | | - Fire upcall to | @@ -587,7 +586,7 @@ struct acrn_intr_monitor { */ enum acrn_vm_load_order { PRE_LAUNCHED_VM = 0, - SOS_VM, + SERVICE_VM, POST_LAUNCHED_VM, /* Launched by Devicemodel in Service VM */ MAX_LOAD_ORDER }; diff --git a/misc/config_tools/board_config/vbar_base_h.py b/misc/config_tools/board_config/vbar_base_h.py index fa1230531..c446caa85 100644 --- a/misc/config_tools/board_config/vbar_base_h.py +++ b/misc/config_tools/board_config/vbar_base_h.py @@ -176,7 +176,7 @@ def write_vuart_vbar(mmiolist_per_vm, sos_mmio_range, config): free_bar0 = [] free_bar1 = [] # vuart decice requires 2 bars - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": free_bar0 = get_free_mmio(sos_mmio_range, mmiolist_per_vm[vm_id], \ PCI_VUART_VBAR0_SIZE + PCI_VUART_VBAR0_ALIGNMENT) free_bar0_start_addr = common.round_up(free_bar0.start, PCI_VUART_VBAR0_ALIGNMENT) @@ -232,7 +232,7 @@ def write_ivshmem_vbar(mmiolist_per_vm, sos_mmio_range, config): int_size = int(size) * 0x100000 except: int_size = 0 - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": # vbar[0] for shared memory is 4k free_bar0 = get_free_mmio(sos_mmio_range, mmiolist_per_vm[vm_id], BAR0_SHEMEM_ALIGNMENT + BAR0_SHEMEM_SIZE) free_bar0_start_addr = common.round_up(free_bar0.start, BAR0_SHEMEM_ALIGNMENT) @@ -376,7 +376,7 @@ def generate_file(config): pci_items = common.get_leaf_tag_map(common.SCENARIO_INFO_FILE, "pci_devs", "pci_dev") pci_devs = scenario_cfg_lib.get_pt_pci_devs(pci_items) pci_devs_per_vm = get_devs_per_vm_with_key(pci_devs, bdf_list) - # list SOS vmsix supported devices without other PRE_LAUNCHED_VMs' in bdf format + # list Service VM vmsix supported devices without other PRE_LAUNCHED_VMs' in bdf format sos_bdf_list = [ d for d in bdf_list if all((d not in pci_devs_per_vm[i] for i in pci_devs_per_vm)) @@ -384,14 +384,14 @@ def generate_file(config): for vm_i in pci_devs_per_vm: vm_type = common.VM_TYPES[vm_i] - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": pci_devs_per_vm[vm_i] = sos_bdf_list mmiolist_per_vm = {} for vm_i,vm_type in common.VM_TYPES.items(): if vm_i not in mmiolist_per_vm.keys(): mmiolist_per_vm[vm_i] = [] - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": mmiolist_per_vm[vm_i] = non_matching_mmios else: if vm_i in pci_devs.keys(): @@ -420,7 +420,7 @@ def generate_file(config): for vm_type in common.VM_TYPES.values(): if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "PRE_LAUNCHED_VM": pre_vm = True - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": sos_vm = True if not pre_vm and not sos_vm: diff --git a/misc/config_tools/config_app/views.py b/misc/config_tools/config_app/views.py index b444f2a9b..e38c26c84 100644 --- a/misc/config_tools/config_app/views.py +++ b/misc/config_tools/config_app/views.py @@ -986,7 +986,7 @@ def get_post_launch_vms(): vm_list = get_post_launch_vm_list(scenario_name) - uos_id_list = [] + user_vmid_list = [] launch_name = data['launch_name'] xml_configs = get_xml_configs() launch_config = xml_configs[3] @@ -994,12 +994,12 @@ def get_post_launch_vms(): if launch_config is not None and launch_config.get_curr_root() is not None: for uos in list(launch_config.get_curr_root()): if 'id' in uos.attrib: - uos_id_list.append(int(uos.attrib['id'])-1) + user_vmid_list.append(int(uos.attrib['id'])-1) vm_list_index = [i for i in range(len(vm_list))] vm_list_index = set(vm_list_index) - uos_id_list = set(uos_id_list) - index = list(vm_list_index - uos_id_list) + user_vmid_list = set(user_vmid_list) + index = list(vm_list_index - user_vmid_list) vm_list = [vm_list[i] for i in index] return {'vm_list': vm_list} @@ -1079,7 +1079,7 @@ def get_generic_scenario_config(scenario_config, add_vm_type=None): 'PRE_STD_VM': ('partitioned', 'vm:id=0'), 'PRE_RT_VM': ('hybrid_rt', 'vm:id=0'), 'SAFETY_VM': ('hybrid', 'vm:id=0'), - 'SOS_VM': ('shared', 'vm:id=0'), + 'SERVICE_VM': ('shared', 'vm:id=0'), 'POST_STD_VM': ('shared', 'vm:id=1'), 'POST_RT_VM': ('shared', 'vm:id=2'), 'KATA_VM': ('shared', 'vm:id=7'), @@ -1274,7 +1274,7 @@ def assign_vm_id(scenario_config): if item.tag == 'vm_type': if item.text in ['PRE_STD_VM', 'SAFETY_VM', 'PRE_RT_VM']: pre_launched_vm_num += 1 - elif item.text in ['SOS_VM']: + elif item.text in ['SERVICE_VM']: sos_vm_num += 1 elif item.text in ['POST_STD_VM', 'POST_RT_VM', 'KATA_VM']: post_launched_vm_num += 1 @@ -1289,7 +1289,7 @@ def assign_vm_id(scenario_config): if item.text in ['PRE_STD_VM', 'SAFETY_VM', 'PRE_RT_VM']: vm.attrib['id'] = str(pre_launched_vm_index) pre_launched_vm_index += 1 - elif item.text in ['SOS_VM']: + elif item.text in ['SERVICE_VM']: vm.attrib['id'] = str(sos_vm_index) sos_vm_index += 1 elif item.text in ['POST_STD_VM', 'POST_RT_VM', 'KATA_VM']: diff --git a/misc/config_tools/data/cfl-k700-i7/hybrid_rt.xml b/misc/config_tools/data/cfl-k700-i7/hybrid_rt.xml index 219b67780..8b80d892f 100644 --- a/misc/config_tools/data/cfl-k700-i7/hybrid_rt.xml +++ b/misc/config_tools/data/cfl-k700-i7/hybrid_rt.xml @@ -123,8 +123,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -156,13 +156,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/cfl-k700-i7/shared.xml b/misc/config_tools/data/cfl-k700-i7/shared.xml index b5f90ef0b..1cf94a64c 100644 --- a/misc/config_tools/data/cfl-k700-i7/shared.xml +++ b/misc/config_tools/data/cfl-k700-i7/shared.xml @@ -60,8 +60,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -81,13 +81,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 2 1 diff --git a/misc/config_tools/data/generic_board/hybrid.xml b/misc/config_tools/data/generic_board/hybrid.xml index a0750363b..ef2bcb423 100644 --- a/misc/config_tools/data/generic_board/hybrid.xml +++ b/misc/config_tools/data/generic_board/hybrid.xml @@ -119,8 +119,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -142,17 +142,17 @@ KERNEL_BZIMAGE Linux_bzImage - SOS_VM_BOOTARGS + SERVICE_VM_OS_BOOTARGS VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/generic_board/hybrid_launch_2uos.xml b/misc/config_tools/data/generic_board/hybrid_launch_2uos.xml index 5238af70a..a125ee051 100644 --- a/misc/config_tools/data/generic_board/hybrid_launch_2uos.xml +++ b/misc/config_tools/data/generic_board/hybrid_launch_2uos.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Disable - + n - n + n @@ -41,17 +41,17 @@ ./win10-ltsc.img - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -83,5 +83,5 @@ ./YaaG.img - + diff --git a/misc/config_tools/data/generic_board/hybrid_rt.xml b/misc/config_tools/data/generic_board/hybrid_rt.xml index e18804ce4..03a3c8eb5 100644 --- a/misc/config_tools/data/generic_board/hybrid_rt.xml +++ b/misc/config_tools/data/generic_board/hybrid_rt.xml @@ -127,8 +127,8 @@ - SOS_VM - ACRN_SOS_VM + SERVICE_VM + ACRN Service VM 0 @@ -148,17 +148,17 @@ KERNEL_BZIMAGE Linux_bzImage - SOS_VM_BOOTARGS + SERVICE_VM_OS_BOOTARGS VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/generic_board/shared.xml b/misc/config_tools/data/generic_board/shared.xml index bba8fd9d7..804790cc8 100644 --- a/misc/config_tools/data/generic_board/shared.xml +++ b/misc/config_tools/data/generic_board/shared.xml @@ -61,8 +61,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -78,17 +78,17 @@ KERNEL_BZIMAGE Linux_bzImage - SOS_VM_BOOTARGS + SERVICE_VM_OS_BOOTARGS VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 2 1 diff --git a/misc/config_tools/data/generic_board/shared_launch_6uos.xml b/misc/config_tools/data/generic_board/shared_launch_6uos.xml index 108c309e1..a95ff5da2 100644 --- a/misc/config_tools/data/generic_board/shared_launch_6uos.xml +++ b/misc/config_tools/data/generic_board/shared_launch_6uos.xml @@ -1,14 +1,14 @@ - - WINDOWS + + WINDOWS no 4096 gvtd ovmf Disable - + n - n + n @@ -41,17 +41,17 @@ ./win10-ltsc.img - + - - PREEMPT-RT LINUX + + PREEMPT-RT LINUX Hard RT 1024 ovmf Disable - - n + + n n @@ -85,17 +85,17 @@ ./core-image-weston-intel-corei7-64.wic @stdio:stdio_port - - - YOCTO + + + YOCTO no 512 ovmf Disable - + n - n + n @@ -127,17 +127,17 @@ ./YaaG.img - - - YOCTO + + + YOCTO no 512 ovmf Disable - + n - n + n @@ -169,17 +169,17 @@ ./YaaG.img - - - YOCTO + + + YOCTO no 512 ovmf Disable - + n - n + n @@ -211,17 +211,17 @@ ./YaaG.img - - - YOCTO + + + YOCTO no 512 ovmf Disable - + n - n + n @@ -253,5 +253,5 @@ ./YaaG.img - + diff --git a/misc/config_tools/data/nuc11tnbi5/hybrid.xml b/misc/config_tools/data/nuc11tnbi5/hybrid.xml index 75440ba4c..0d068a1d7 100644 --- a/misc/config_tools/data/nuc11tnbi5/hybrid.xml +++ b/misc/config_tools/data/nuc11tnbi5/hybrid.xml @@ -119,8 +119,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -146,13 +146,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2uos.xml b/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2uos.xml index 060e9d4b9..13f0a0371 100644 --- a/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2uos.xml +++ b/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2uos.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Disable - + n - n + n @@ -41,17 +41,17 @@ ./win10-ltsc.img - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -83,5 +83,5 @@ ./YaaG.img - + diff --git a/misc/config_tools/data/nuc11tnbi5/shared.xml b/misc/config_tools/data/nuc11tnbi5/shared.xml index 42b76c5fc..dfe2f1e46 100644 --- a/misc/config_tools/data/nuc11tnbi5/shared.xml +++ b/misc/config_tools/data/nuc11tnbi5/shared.xml @@ -61,8 +61,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -82,13 +82,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 2 1 diff --git a/misc/config_tools/data/nuc11tnbi5/shared_launch_6uos.xml b/misc/config_tools/data/nuc11tnbi5/shared_launch_6uos.xml index c65a245c1..46c7e420c 100644 --- a/misc/config_tools/data/nuc11tnbi5/shared_launch_6uos.xml +++ b/misc/config_tools/data/nuc11tnbi5/shared_launch_6uos.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Disable - + n - n + n @@ -41,17 +41,17 @@ ./win10-ltsc.img - + - - PREEMPT-RT LINUX - Hard RT - 1024 + + PREEMPT-RT LINUX + Hard RT + 1024 ovmf Disable - - n + + n n @@ -85,17 +85,17 @@ ./core-image-weston-intel-corei7-64.wic @stdio:stdio_port - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -127,17 +127,17 @@ ./YaaG.img - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -169,17 +169,17 @@ ./YaaG.img - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -211,17 +211,17 @@ ./YaaG.img - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -253,5 +253,5 @@ ./YaaG.img - + diff --git a/misc/config_tools/data/qemu/sdc.xml b/misc/config_tools/data/qemu/sdc.xml index 99845e120..70d3d5cb5 100644 --- a/misc/config_tools/data/qemu/sdc.xml +++ b/misc/config_tools/data/qemu/sdc.xml @@ -60,8 +60,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -80,13 +80,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO INVALID_COM_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_IRQ 1 1 diff --git a/misc/config_tools/data/whl-ipc-i5/hybrid.xml b/misc/config_tools/data/whl-ipc-i5/hybrid.xml index c0f143207..58c2c7ca4 100644 --- a/misc/config_tools/data/whl-ipc-i5/hybrid.xml +++ b/misc/config_tools/data/whl-ipc-i5/hybrid.xml @@ -115,8 +115,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -142,13 +142,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/whl-ipc-i5/hybrid_rt.xml b/misc/config_tools/data/whl-ipc-i5/hybrid_rt.xml index 970f1bf5a..8442387eb 100644 --- a/misc/config_tools/data/whl-ipc-i5/hybrid_rt.xml +++ b/misc/config_tools/data/whl-ipc-i5/hybrid_rt.xml @@ -122,8 +122,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -147,13 +147,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 0 1 diff --git a/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1uos_waag.xml b/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1uos_waag.xml index 0558e2632..4deec1022 100644 --- a/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1uos_waag.xml +++ b/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1uos_waag.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Enable - + n - n + n @@ -41,5 +41,5 @@ ./win10-ltsc.img - + diff --git a/misc/config_tools/data/whl-ipc-i5/sdc.xml b/misc/config_tools/data/whl-ipc-i5/sdc.xml index 47d126058..72fc75a33 100644 --- a/misc/config_tools/data/whl-ipc-i5/sdc.xml +++ b/misc/config_tools/data/whl-ipc-i5/sdc.xml @@ -59,8 +59,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -79,13 +79,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO INVALID_COM_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_IRQ 1 1 diff --git a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_laag.xml b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_laag.xml index 28c176950..45d9d3592 100644 --- a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_laag.xml +++ b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_laag.xml @@ -1,14 +1,14 @@ - - YOCTO - no - 2048 + + YOCTO + no + 2048 gvtd ovmf Disable - + n - n + n @@ -42,5 +42,5 @@ /home/clear/uos/uos.img @stdio:stdio_port - + diff --git a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_zephyr.xml b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_zephyr.xml index c5e064aa6..bedb76a58 100644 --- a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_zephyr.xml +++ b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1uos_zephyr.xml @@ -1,14 +1,14 @@ - - ZEPHYR - no - 128 + + ZEPHYR + no + 128 ovmf Enable - + n - n + n @@ -42,5 +42,5 @@ ./zephyr.img @pty:pty_port - + diff --git a/misc/config_tools/data/whl-ipc-i5/shared.xml b/misc/config_tools/data/whl-ipc-i5/shared.xml index 65a595dcd..bf0c7829c 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared.xml @@ -59,8 +59,8 @@ - SOS_VM - ACRN SOS VM + SERVICE_VM + ACRN Service VM 0 @@ -80,13 +80,13 @@ VUART_LEGACY_PIO - SOS_COM1_BASE - SOS_COM1_IRQ + SERVICE_VM_COM1_BASE + SERVICE_VM_COM1_IRQ VUART_LEGACY_PIO - SOS_COM2_BASE - SOS_COM2_IRQ + SERVICE_VM_COM2_BASE + SERVICE_VM_COM2_IRQ 2 1 diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_hardrt.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_hardrt.xml index d93e1f527..ad1e17ba3 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_hardrt.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_hardrt.xml @@ -1,14 +1,14 @@ - - PREEMPT-RT LINUX - Hard RT - 1024 + + PREEMPT-RT LINUX + Hard RT + 1024 ovmf Disable - + n - n + n @@ -41,5 +41,5 @@ ./core-image-weston-intel-corei7-64.wic @stdio:stdio_port - + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_vxworks.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_vxworks.xml index 26fba586f..4254c82f0 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_vxworks.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_vxworks.xml @@ -1,14 +1,14 @@ - - VXWORKS - Hard RT - 2048 + + VXWORKS + Hard RT + 2048 ovmf Disable - + n - n + n @@ -41,5 +41,5 @@ ./VxWorks.img @stdio:stdio_port - + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_waag.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_waag.xml index 38592be46..6e3dac6c7 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_waag.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1uos_waag.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Enable - + n - n + n @@ -41,5 +41,5 @@ ./win10-ltsc.img - + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_2uos.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_2uos.xml index 060eddac9..9b888d8dc 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_2uos.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_2uos.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Enable - + n - n + n @@ -41,18 +41,18 @@ ./win10-ltsc.img - + - - PREEMPT-RT LINUX - Hard RT - 1024 + + PREEMPT-RT LINUX + Hard RT + 1024 ovmf Disable - + n - n + n @@ -85,5 +85,5 @@ ./core-image-weston-intel-corei7-64.wic @stdio:stdio_port - + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_6uos.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_6uos.xml index d9d8fff42..10e01d88c 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_6uos.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_6uos.xml @@ -1,14 +1,14 @@ - - WINDOWS - no - 4096 + + WINDOWS + no + 4096 gvtd ovmf Enable - + n - n + n @@ -41,18 +41,18 @@ ./win10-ltsc.img - + - - PREEMPT-RT LINUX - Hard RT - 1024 + + PREEMPT-RT LINUX + Hard RT + 1024 ovmf Disable - + n - n + n @@ -85,17 +85,17 @@ ./core-image-weston-intel-corei7-64.wic @stdio:stdio_port - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -127,17 +127,17 @@ - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -169,17 +169,17 @@ - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -211,17 +211,17 @@ - - - YOCTO - no - 512 + + + YOCTO + no + 512 ovmf Disable - + n - n + n @@ -253,5 +253,5 @@ - + diff --git a/misc/config_tools/hv_config/board_defconfig.py b/misc/config_tools/hv_config/board_defconfig.py index 1d158cb61..a0f43a48a 100644 --- a/misc/config_tools/hv_config/board_defconfig.py +++ b/misc/config_tools/hv_config/board_defconfig.py @@ -91,7 +91,7 @@ def get_memory(hv_info, config): # reseve 16M memory for hv sbuf, ramoops, etc. reserved_ram = 0x1000000 # We recommend to put hv ram start address high than 0x10000000 to - # reduce memory conflict with GRUB/SOS Kernel. + # reduce memory conflict with GRUB/Service VM Kernel. hv_start_offset = 0x10000000 total_size = reserved_ram + hv_ram_size for start_addr in list(board_cfg_lib.USED_RAM_RANGE): diff --git a/misc/config_tools/launch_config/com.py b/misc/config_tools/launch_config/com.py index 4e6d2cea5..c8ad11d63 100644 --- a/misc/config_tools/launch_config/com.py +++ b/misc/config_tools/launch_config/com.py @@ -10,10 +10,10 @@ import pt def is_nuc_whl_linux(names, vmid): - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] board_name = names['board_name'] - if launch_cfg_lib.is_linux_like(uos_type) and board_name not in ("apl-mrb", "apl-up2"): + if launch_cfg_lib.is_linux_like(user_vm_type) and board_name not in ("apl-mrb", "apl-up2"): return True return False @@ -27,13 +27,13 @@ def is_mount_needed(virt_io, vmid): return False -def tap_uos_net(names, virt_io, vmid, config): - uos_type = names['uos_types'][vmid] +def tap_user_vm_net(names, virt_io, vmid, config): + user_vm_type = names['user_vm_types'][vmid] board_name = names['board_name'] - vm_name = common.undline_name(uos_type).lower() + vm_name = common.undline_name(user_vm_type).lower() - if launch_cfg_lib.is_linux_like(uos_type) or uos_type in ("ANDROID", "ALIOS"): + if launch_cfg_lib.is_linux_like(user_vm_type) or user_vm_type in ("ANDROID", "ALIOS"): i = 0 for mount_flag in launch_cfg_lib.MOUNT_FLAG_DIC[vmid]: if not mount_flag: @@ -48,7 +48,7 @@ def tap_uos_net(names, virt_io, vmid, config): print("", file=config) i += 1 - print("#vm-name used to generate uos-mac address", file=config) + print("#vm-name used to generate user-vm-mac address", file=config) print("mac=$(cat /sys/class/net/e*/address)", file=config) print("vm_name=post_vm_id$1", file=config) print("mac_seed=${mac:0:17}-${vm_name}", file=config) @@ -72,11 +72,11 @@ def tap_uos_net(names, virt_io, vmid, config): print("", file=config) -def off_line_cpus(args, vmid, uos_type, config): +def off_line_cpus(args, vmid, user_vm_type, config): """ :param args: the dictionary of argument for acrn-dm :param vmid: ID of the vm - :param uos_type: the type of UOS + :param user_vm_type: the type of User VM :param config: it is a file pointer to write offline cpu information """ pcpu_id_list = get_cpu_affinity_list(args["cpu_affinity"], vmid) @@ -89,7 +89,7 @@ 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 pinned vCPUs from SOS before launch UOS", file=config) + print("# offline pinned vCPUs from Service VM before launch User VM", file=config) print('cpu_path="/sys/devices/system/cpu"', file=config) print("for i in `ls ${cpu_path}`; do", file=config) print(" for j in {}; do".format(' '.join([str(i) for i in pcpu_id_list])), file=config) @@ -114,18 +114,18 @@ def off_line_cpus(args, vmid, uos_type, config): print("", file=config) -def run_container(board_name, uos_type, config): +def run_container(board_name, user_vm_type, config): """ The container contains the clearlinux as rootfs :param board_name: board name - :param uos_type: the os name of user os + :param user_vm_type: the os name of user os :param config: the file pointer to store the information """ # the runC.json is store in the path under board name, but for nuc7i7dnb/nuc6cayh/kbl-nuc-i7 is under nuc/ if 'nuc' in board_name: board_name = 'nuc' - if board_name not in ("apl-mrb", "nuc") or not launch_cfg_lib.is_linux_like(uos_type): + if board_name not in ("apl-mrb", "nuc") or not launch_cfg_lib.is_linux_like(user_vm_type): return print("function run_container()", file=config) @@ -221,7 +221,7 @@ def interrupt_storm(pt_sel, config): print("", file=config) -def gvt_arg_set(dm, vmid, uos_type, config): +def gvt_arg_set(dm, vmid, user_vm_type, config): gvt_args = dm['gvt_args'][vmid] gpu_bdf = launch_cfg_lib.get_gpu_bdf() @@ -234,7 +234,7 @@ def gvt_arg_set(dm, vmid, uos_type, config): elif gvt_args: print(' -s 2,pci-gvt -G "$2" \\', file=config) -def log_level_set(uos_type, config): +def log_level_set(user_vm_type, config): print("#logger_setting, format: logger_name,level; like following", file=config) print('logger_setting="--logger_setting console,level=4;kmsg,level=3;disk,level=5"', file=config) @@ -274,17 +274,17 @@ def tap_network(virt_io, vmid, config): def launch_begin(names, virt_io, vmid, config): board_name = names['board_name'] - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] - launch_uos = common.undline_name(uos_type).lower() + launch_uos = common.undline_name(user_vm_type).lower() tap_network(virt_io, vmid, config) - run_container(board_name, uos_type, config) + run_container(board_name, user_vm_type, config) print("function launch_{}()".format(launch_uos), file=config) print("{", file=config) -def wa_usage(uos_type, config): - if uos_type in ("ANDROID", "ALIOS"): +def wa_usage(user_vm_type, config): + if user_vm_type in ("ANDROID", "ALIOS"): print("# WA for USB role switch hang issue, disable runtime PM of xHCI device", file=config) print("echo on > /sys/devices/pci0000:00/0000:00:15.0/power/control", file=config) print("", file=config) @@ -295,16 +295,16 @@ def mem_size_set(args, vmid, config): print("mem_size={}M".format(mem_size), file=config) -def uos_launch(names, args, virt_io, vmid, config): +def user_vm_launch(names, args, virt_io, vmid, config): gvt_args = args['gvt_args'][vmid] - uos_type = names['uos_types'][vmid] - launch_uos = common.undline_name(uos_type).lower() + user_vm_type = names['user_vm_types'][vmid] + launch_uos = common.undline_name(user_vm_type).lower() board_name = names['board_name'] if 'nuc' in board_name: board_name = 'nuc' - if uos_type == "CLEARLINUX" and board_name in ("apl-mrb", "nuc"): + if user_vm_type == "CLEARLINUX" and board_name in ("apl-mrb", "nuc"): print('if [ "$1" = "-C" ];then', file=config) print(' if [ $(hostname) = "runc" ]; then', file=config) print(' echo "Already in container exit!"', file=config) @@ -362,10 +362,10 @@ def uos_launch(names, args, virt_io, vmid, config): def launch_end(names, args, virt_io, vmid, config): board_name = names['board_name'] - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] mem_size = args["mem_size"][vmid] - if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS") and not is_nuc_whl_linux(names, vmid): + if user_vm_type in ("CLEARLINUX", "ANDROID", "ALIOS") and not is_nuc_whl_linux(names, vmid): print("debug=0", file=config) print("", file=config) print('while getopts "hdC" opt', file=config) @@ -404,18 +404,18 @@ def launch_end(names, args, virt_io, vmid, config): sos_vmid = launch_cfg_lib.get_sos_vmid() if args['cpu_sharing'] == "SCHED_NOOP" or common.VM_TYPES[vmid+sos_vmid] == "POST_RT_VM": - off_line_cpus(args, vmid, uos_type, config) + off_line_cpus(args, vmid, user_vm_type, config) - uos_launch(names, args, virt_io, vmid, config) + user_vm_launch(names, args, virt_io, vmid, config) def set_dm_pt(names, sel, vmid, config, dm): - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] if sel.bdf['usb_xdci'][vmid] and sel.slot['usb_xdci'][vmid]: sub_attr = '' - if uos_type == "WINDOWS": + if user_vm_type == "WINDOWS": sub_attr = ',d3hot_reset' print(' -s {},passthru,{}/{}/{}{} \\'.format(sel.slot["usb_xdci"][vmid], sel.bdf["usb_xdci"][vmid][0:2],\ sel.bdf["usb_xdci"][vmid][3:5], sel.bdf["usb_xdci"][vmid][6:7], sub_attr), file=config) @@ -436,7 +436,7 @@ def set_dm_pt(names, sel, vmid, config, dm): sel.bdf["bluetooth"][vmid][3:5], sel.bdf["bluetooth"][vmid][6:7]), file=config) if sel.bdf['wifi'][vmid] and sel.slot['wifi'][vmid]: - if uos_type == "ANDROID": + if user_vm_type == "ANDROID": print(" -s {},passthru,{}/{}/{},keep_gsi \\".format(sel.slot["wifi"][vmid], sel.bdf["wifi"][vmid][0:2], \ sel.bdf["wifi"][vmid][3:5], sel.bdf["wifi"][vmid][6:7]), file=config) else: @@ -530,9 +530,9 @@ def virtio_args_set(dm, virt_io, vmid, config): def get_cpu_affinity_list(cpu_affinity, vmid): pcpu_id_list = '' - for uos_id,cpus in cpu_affinity.items(): - if vmid == uos_id: - pcpu_id_list = [id for id in list(cpu_affinity[uos_id]) if id != None] + for user_vmid,cpus in cpu_affinity.items(): + if vmid == user_vmid: + pcpu_id_list = [id for id in list(cpu_affinity[user_vmid]) if id != None] return pcpu_id_list @@ -547,7 +547,7 @@ def pcpu_arg_set(dm, vmid, config): def dm_arg_set(names, sel, virt_io, dm, vmid, config): - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] board_name = names['board_name'] boot_image_type(dm, vmid, config) @@ -558,8 +558,8 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): # clearlinux/android/alios print('acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\'.format(scenario_uuid), file=config) - if launch_cfg_lib.is_linux_like(uos_type) or uos_type in ("ANDROID", "ALIOS"): - if uos_type in ("ANDROID", "ALIOS"): + if launch_cfg_lib.is_linux_like(user_vm_type) or user_vm_type in ("ANDROID", "ALIOS"): + if user_vm_type in ("ANDROID", "ALIOS"): print(' $npk_virt \\', file=config) print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config) print(" --enable_trusty \\", file=config) @@ -577,7 +577,7 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): print(" --lapic_pt \\", file=config) # windows - if uos_type == "WINDOWS": + if user_vm_type == "WINDOWS": print(" --windows \\", file=config) # pm_channel set @@ -591,11 +591,11 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): if pm_key == "vuart1(tty)": vuart_base = launch_cfg_lib.get_vuart1_from_scenario(sos_vmid + vmid) if vuart_base == "INVALID_COM_BASE": - err_key = "uos:id={}:poweroff_channel".format(vmid) - launch_cfg_lib.ERR_LIST[err_key] = "vuart1 of VM{} in scenario file should select 'SOS_COM2_BASE'".format(sos_vmid + vmid) + err_key = "user_vm:id={}:poweroff_channel".format(vmid) + launch_cfg_lib.ERR_LIST[err_key] = "vuart1 of VM{} in scenario file should select 'SERVICE_VM_COM2_BASE'".format(sos_vmid + vmid) return scenario_cfg_lib.get_sos_vuart_settings() - print(" {} \\".format(pm_vuart + launch_cfg_lib.PM_CHANNEL_DIC[pm_key] + scenario_cfg_lib.SOS_UART1_VALID_NUM), file=config) + print(" {} \\".format(pm_vuart + launch_cfg_lib.PM_CHANNEL_DIC[pm_key] + scenario_cfg_lib.SERVICE_VM_UART1_VALID_NUM), file=config) elif pm_key == "vuart1(pty)": print(" {} \\".format(pm_vuart + launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config) else: @@ -605,7 +605,7 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): print(" $logger_setting \\", file=config) # GVT args set - gvt_arg_set(dm, vmid, uos_type, config) + gvt_arg_set(dm, vmid, user_vm_type, config) # XHCI args set xhci_args_set(dm, vmid, config) @@ -628,7 +628,7 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): ssram_enabled = common.get_hv_item_tag(common.SCENARIO_INFO_FILE, "FEATURES", "SSRAM", "SSRAM_ENABLED") except: pass - if uos_type == "PREEMPT-RT LINUX" and ssram_enabled == 'y': + if user_vm_type == "PREEMPT-RT LINUX" and ssram_enabled == 'y': print(" --ssram \\", file=config) for value in sel.bdf.values(): @@ -636,14 +636,14 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): print(" $intr_storm_monitor \\", file=config) break - if uos_type != "PREEMPT-RT LINUX": + if user_vm_type != "PREEMPT-RT LINUX": print(" -s 1:0,lpc \\", file=config) # redirect console if dm['vuart0'][vmid] == "Enable": print(" -l com1,stdio \\", file=config) - if launch_cfg_lib.is_linux_like(uos_type) or uos_type in ("ANDROID", "ALIOS"): + if launch_cfg_lib.is_linux_like(user_vm_type) or user_vm_type in ("ANDROID", "ALIOS"): if board_name == "apl-mrb": print(" -i /run/acrn/ioc_$vm_name,0x20 \\", file=config) print(" -l com2,/run/acrn/ioc_$vm_name \\", file=config) @@ -669,21 +669,21 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config): def gen(names, pt_sel, virt_io, dm, vmid, config): board_name = names['board_name'] - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] # passthrough bdf/vpid dictionay pt.gen_pt_head(names, dm, pt_sel, vmid, config) # gen launch header launch_begin(names, virt_io, vmid, config) - tap_uos_net(names, virt_io, vmid, config) + tap_user_vm_net(names, virt_io, vmid, config) # passthrough device pt.gen_pt(names, dm, pt_sel, vmid, config) - wa_usage(uos_type, config) + wa_usage(user_vm_type, config) mem_size_set(dm, vmid, config) interrupt_storm(pt_sel, config) - log_level_set(uos_type, config) + log_level_set(user_vm_type, config) # gen acrn-dm args dm_arg_set(names, pt_sel, virt_io, dm, vmid, config) diff --git a/misc/config_tools/launch_config/launch_cfg_gen.py b/misc/config_tools/launch_config/launch_cfg_gen.py index bf46134bf..4500fe9a6 100644 --- a/misc/config_tools/launch_config/launch_cfg_gen.py +++ b/misc/config_tools/launch_config/launch_cfg_gen.py @@ -31,29 +31,29 @@ def get_launch_item_values(board_info, scenario_info=None): pthru.insert_nun() # pre passthrough device for ui - launch_item_values["uos,passthrough_devices,usb_xdci"] = pthru.avl["usb_xdci"] - launch_item_values["uos,passthrough_devices,ipu"] = pthru.avl["ipu"] - launch_item_values["uos,passthrough_devices,ipu_i2c"] = pthru.avl["ipu_i2c"] - launch_item_values["uos,passthrough_devices,cse"] = pthru.avl["cse"] - launch_item_values["uos,passthrough_devices,audio"] = pthru.avl["audio"] - launch_item_values["uos,passthrough_devices,audio_codec"] = pthru.avl["audio_codec"] - launch_item_values["uos,passthrough_devices,sd_card"] = pthru.avl["sd_card"] - launch_item_values["uos,passthrough_devices,wifi"] = pthru.avl["wifi"] - launch_item_values["uos,passthrough_devices,ethernet"] = pthru.avl["ethernet"] - launch_item_values["uos,passthrough_devices,sata"] = pthru.avl["sata"] - launch_item_values["uos,passthrough_devices,nvme"] = pthru.avl["nvme"] - launch_item_values["uos,passthrough_devices,bluetooth"] = pthru.avl["bluetooth"] + launch_item_values["user_vm,passthrough_devices,usb_xdci"] = pthru.avl["usb_xdci"] + launch_item_values["user_vm,passthrough_devices,ipu"] = pthru.avl["ipu"] + launch_item_values["user_vm,passthrough_devices,ipu_i2c"] = pthru.avl["ipu_i2c"] + launch_item_values["user_vm,passthrough_devices,cse"] = pthru.avl["cse"] + launch_item_values["user_vm,passthrough_devices,audio"] = pthru.avl["audio"] + launch_item_values["user_vm,passthrough_devices,audio_codec"] = pthru.avl["audio_codec"] + launch_item_values["user_vm,passthrough_devices,sd_card"] = pthru.avl["sd_card"] + launch_item_values["user_vm,passthrough_devices,wifi"] = pthru.avl["wifi"] + launch_item_values["user_vm,passthrough_devices,ethernet"] = pthru.avl["ethernet"] + launch_item_values["user_vm,passthrough_devices,sata"] = pthru.avl["sata"] + launch_item_values["user_vm,passthrough_devices,nvme"] = pthru.avl["nvme"] + launch_item_values["user_vm,passthrough_devices,bluetooth"] = pthru.avl["bluetooth"] # acrn dm available optargs - launch_item_values['uos,uos_type'] = launch_cfg_lib.UOS_TYPES - launch_item_values["uos,rtos_type"] = launch_cfg_lib.RTOS_TYPE + launch_item_values['user_vm,user_vm_type'] = launch_cfg_lib.USER_VM_TYPES + launch_item_values["user_vm,rtos_type"] = launch_cfg_lib.RTOS_TYPE - launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE - launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0 - launch_item_values['uos,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL - launch_item_values["uos,cpu_affinity"] = board_cfg_lib.get_processor_info() - launch_item_values['uos,enable_ptm'] = launch_cfg_lib.y_n - launch_item_values['uos,allow_trigger_s5'] = launch_cfg_lib.y_n + launch_item_values["user_vm,vbootloader"] = launch_cfg_lib.BOOT_TYPE + launch_item_values['user_vm,vuart0'] = launch_cfg_lib.DM_VUART0 + launch_item_values['user_vm,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL + launch_item_values["user_vm,cpu_affinity"] = board_cfg_lib.get_processor_info() + launch_item_values['user_vm,enable_ptm'] = launch_cfg_lib.y_n + launch_item_values['user_vm,allow_trigger_s5'] = launch_cfg_lib.y_n launch_cfg_lib.set_shm_regions(launch_item_values, scenario_info) launch_cfg_lib.set_pci_vuarts(launch_item_values, scenario_info) @@ -99,7 +99,7 @@ def validate_launch_setting(board_info, scenario_info, launch_info): def ui_entry_api(board_info, scenario_info, launch_info, out=''): err_dic = {} - arg_list = ['launch_cfg_gen.py', '--board', board_info, '--scenario', scenario_info, '--launch', launch_info, '--uosid', '0', '--out', out] + arg_list = ['launch_cfg_gen.py', '--board', board_info, '--scenario', scenario_info, '--launch', launch_info, '--user_vmid', '0', '--out', out] err_dic = common.prepare() if err_dic: @@ -113,9 +113,9 @@ def get_names(): names = {} - # get uos name - uos_types = launch_cfg_lib.get_uos_type() - names['uos_types'] = uos_types + # get User Vm name + user_vm_types = launch_cfg_lib.get_user_vm_type() + names['user_vm_types'] = user_vm_types # get board name (err_dic, board_name) = common.get_board_name() @@ -134,13 +134,13 @@ def get_names(): def generate_script_file(names, pt_sel, virt_io, dm, vmid, config): - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] board_name = names['board_name'] scenario_name = names['scenario_name'] header_info = "#!/bin/bash\n" +\ - "# board: {}, scenario: {}, uos: {}".format( - board_name.upper(), scenario_name.upper(), uos_type.upper()) + "# board: {}, scenario: {}, user_vm: {}".format( + board_name.upper(), scenario_name.upper(), user_vm_type.upper()) print("{}".format(header_info), file=config) com.gen(names, pt_sel, virt_io, dm, vmid, config) @@ -179,15 +179,15 @@ def main(args): # get toatl post vm number and total vm in launch config file (launch_vm_count, post_vm_count) = launch_cfg_lib.get_post_vm_cnt() if vm_th < 0 or vm_th > post_vm_count: - err_dic['uosid err:'] = "--uosid shoudl be positive and less than total post vm count in scenario" + err_dic['user_vmid err:'] = "--user_vmid shoudl be positive and less than total post vm count in scenario" if vm_th and vm_th not in post_num_list: - err_dic['uosid err:'] = "--uosid generate the {} post vm, but this vm's config not in launch xml".format(vm_th) + err_dic['user_vmid err:'] = "--user_vmid generate the {} post vm, but this vm's config not in launch xml".format(vm_th) if launch_vm_count > post_vm_count: err_dic['xm config err:'] = "too many vms config than scenario" for post_num in post_num_list: if post_num > post_vm_count: - err_dic['xm config err:'] = "launch xml uos id config is bigger than scenario post vm count" + err_dic['xm config err:'] = "launch xml user vmid config is bigger than scenario post vm count" if err_dic: return err_dic diff --git a/misc/config_tools/launch_config/launch_item.py b/misc/config_tools/launch_config/launch_item.py index 7d89304fe..5bcdc1e57 100644 --- a/misc/config_tools/launch_config/launch_item.py +++ b/misc/config_tools/launch_config/launch_item.py @@ -17,7 +17,7 @@ class AcrnDmArgs: self.launch_info = launch_info def get_args(self): - self.args["uos_type"] = common.get_leaf_tag_map(self.launch_info, "uos_type") + self.args["user_vm_type"] = common.get_leaf_tag_map(self.launch_info, "user_vm_type") self.args["rtos_type"] = common.get_leaf_tag_map(self.launch_info, "rtos_type") self.args["mem_size"] = common.get_leaf_tag_map(self.launch_info, "mem_size") self.args["gvt_args"] = common.get_leaf_tag_map(self.launch_info, "gvt_args") @@ -41,14 +41,14 @@ class AcrnDmArgs: def check_item(self): (rootfs, num) = board_cfg_lib.get_rootfs(self.board_info) - launch_cfg_lib.args_aval_check(self.args["uos_type"], "uos_type", launch_cfg_lib.UOS_TYPES) + launch_cfg_lib.args_aval_check(self.args["user_vm_type"], "user_vm_type", launch_cfg_lib.USER_VM_TYPES) launch_cfg_lib.args_aval_check(self.args["rtos_type"], "rtos_type", launch_cfg_lib.RTOS_TYPE) launch_cfg_lib.mem_size_check(self.args["mem_size"], "mem_size") launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader", launch_cfg_lib.BOOT_TYPE) launch_cfg_lib.args_aval_check(self.args["vuart0"], "vuart0", launch_cfg_lib.DM_VUART0) launch_cfg_lib.args_aval_check(self.args["enable_ptm"], "enable_ptm", launch_cfg_lib.y_n) launch_cfg_lib.args_aval_check(self.args["allow_trigger_s5"], "allow_trigger_s5", launch_cfg_lib.y_n) - cpu_affinity = launch_cfg_lib.uos_cpu_affinity(self.args["cpu_affinity"]) + cpu_affinity = launch_cfg_lib.user_vm_cpu_affinity(self.args["cpu_affinity"]) err_dic = scenario_cfg_lib.vm_cpu_affinity_check(self.launch_info, cpu_affinity, "pcpu_id") launch_cfg_lib.ERR_LIST.update(err_dic) launch_cfg_lib.check_shm_regions(self.args["shm_regions"], self.scenario_info) diff --git a/misc/config_tools/launch_config/pt.py b/misc/config_tools/launch_config/pt.py index fa0c1fd38..492094cd7 100644 --- a/misc/config_tools/launch_config/pt.py +++ b/misc/config_tools/launch_config/pt.py @@ -115,7 +115,7 @@ def cse_pt(sel, vmid, config): print("", file=config) -def audio_pt(uos_type, sel, vmid, config): +def audio_pt(user_vm_type, sel, vmid, config): if not sel.bdf['audio'][vmid] and not sel.bdf['audio_codec'][vmid]: return @@ -172,7 +172,7 @@ def audio_pt(uos_type, sel, vmid, config): print(' echo ${passthru_bdf["audio_codec"]} > /sys/bus/pci/drivers/pci-stub/bind', file=config) print("", file=config) - if uos_type == "ANDROID": + if user_vm_type == "ANDROID": print(' boot_audio_option="-s {},passthru,{}/{}/{},keep_gsi '.format( slot_audio, bus, dev, fun), end="", file=config) else: @@ -182,7 +182,7 @@ def audio_pt(uos_type, sel, vmid, config): slot_codec, bus_codec, dev_codec, fun_codec), file=config) else: # only select audio device to pass through to vm - if uos_type == "ANDROID": + if user_vm_type == "ANDROID": print(' boot_audio_option="-s {},passthru,{}/{}/{},keep_gsi"'.format( slot_audio, bus, dev, fun), file=config) else: @@ -194,17 +194,17 @@ def audio_pt(uos_type, sel, vmid, config): print("fi", file=config) -def media_pt(uos_type, sel, vmid, config): +def media_pt(user_vm_type, sel, vmid, config): ipu_pt(sel, vmid, config) cse_pt(sel, vmid, config) - audio_pt(uos_type, sel, vmid, config) + audio_pt(user_vm_type, sel, vmid, config) def gen_pt(names, dm, sel, vmid, config): pt_none = True cap_pt = launch_cfg_lib.get_pt_dev() - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] print("modprobe pci_stub", file=config) # pass thru GPU @@ -224,13 +224,13 @@ def gen_pt(names, dm, sel, vmid, config): pass_through_dev(sel, pt_dev, vmid, config) continue - media_pt(uos_type, sel, vmid, config) + media_pt(user_vm_type, sel, vmid, config) def gen_pt_head(names, dm, sel, vmid, config): cap_pt = launch_cfg_lib.get_pt_dev() - uos_type = names['uos_types'][vmid] + user_vm_type = names['user_vm_types'][vmid] print("# pci devices for passthru", file=config) print("declare -A passthru_vpid", file=config) diff --git a/misc/config_tools/library/board_cfg_lib.py b/misc/config_tools/library/board_cfg_lib.py index 529c2819a..00d9e599b 100644 --- a/misc/config_tools/library/board_cfg_lib.py +++ b/misc/config_tools/library/board_cfg_lib.py @@ -271,7 +271,7 @@ def get_native_ttys_info(board_info): ttys_dev = ttys_line.split()[0].split(':')[1] ttysn = ttys_dev.split('/')[-1] - # currently SOS console can only support legacy serial port + # currently Service VM OS console can only support legacy serial port if ttysn not in list(LEGACY_TTYS.keys()): continue ttys_list.append(ttys_dev) diff --git a/misc/config_tools/library/launch_cfg_lib.py b/misc/config_tools/library/launch_cfg_lib.py index 8f88663ad..8c2990ee5 100644 --- a/misc/config_tools/library/launch_cfg_lib.py +++ b/misc/config_tools/library/launch_cfg_lib.py @@ -16,7 +16,7 @@ BOOT_TYPE = ['no', 'vsbl', 'ovmf'] RTOS_TYPE = ['no', 'Soft RT', 'Hard RT'] DM_VUART0 = ['Disable', 'Enable'] y_n = ['y', 'n'] -UOS_TYPES = ['CLEARLINUX', 'ANDROID', 'ALIOS', 'PREEMPT-RT LINUX', 'VXWORKS', 'WINDOWS', 'ZEPHYR', 'YOCTO', 'UBUNTU', 'GENERIC LINUX'] +USER_VM_TYPES = ['CLEARLINUX', 'ANDROID', 'ALIOS', 'PREEMPT-RT LINUX', 'VXWORKS', 'WINDOWS', 'ZEPHYR', 'YOCTO', 'UBUNTU', 'GENERIC LINUX'] LINUX_LIKE_OS = ['CLEARLINUX', 'PREEMPT-RT LINUX', 'YOCTO', 'UBUNTU', 'GENERIC LINUX'] PT_SUB_PCI = {} @@ -62,11 +62,11 @@ MOUNT_FLAG_DIC = {} def usage(file_name): """ This is usage for how to use this tool """ print("usage= {} [h]".format(file_name), end="") - print("--board --scenario --launch --uosid --out [output folder]") + print("--board --scenario --launch --user_vmid --out [output folder]") print('board_info_file : file name of the board info') print('scenario_info_file : file name of the scenario info') print('launch_info_file : file name of the launch info') - print('uosid : this is the relative id for post launch vm in scenario info XML:[1..max post launch vm]') + print('user_vmid : this is the relative id for post launch vm in scenario info XML:[1..max post launch vm]') print('output folder : path to acrn-hypervisor_folder') @@ -81,7 +81,7 @@ def get_param(args): scenario_info_file = False launch_info_file = False output_folder = False - param_list = ['--board', '--scenario', '--launch', '--uosid'] + param_list = ['--board', '--scenario', '--launch', '--user_vmid'] for arg_str in param_list: @@ -91,7 +91,7 @@ def get_param(args): return (err_dic, board_info_file, scenario_info_file, launch_info_file, int(vm_th), output_folder) args_list = args[1:] - (optlist, args_list) = getopt.getopt(args_list, '', ['board=', 'scenario=', 'launch=', 'uosid=', 'out=']) + (optlist, args_list) = getopt.getopt(args_list, '', ['board=', 'scenario=', 'launch=', 'user_vmid=', 'out=']) for arg_k, arg_v in optlist: if arg_k == '--board': board_info_file = arg_v @@ -101,11 +101,11 @@ def get_param(args): launch_info_file = arg_v if arg_k == '--out': output_folder = arg_v - if '--uosid' in args: - if arg_k == '--uosid': + if '--user_vmid' in args: + if arg_k == '--user_vmid': vm_th = arg_v if not vm_th.isnumeric(): - err_dic['common error: wrong parameter'] = "--uosid should be a number" + err_dic['common error: wrong parameter'] = "--user_vmid should be a number" return (err_dic, board_info_file, scenario_info_file, launch_info_file, int(vm_th), output_folder) if not board_info_file or not scenario_info_file or not launch_info_file: @@ -139,7 +139,7 @@ def launch_vm_cnt(config_file): # get post vm number root = common.get_config_root(config_file) for item in root: - if item.tag == "uos": + if item.tag == "user_vm": post_vm_count += 1 return post_vm_count @@ -155,7 +155,7 @@ def get_post_num_list(): # get post vm number root = common.get_config_root(common.LAUNCH_INFO_FILE) for item in root: - if item.tag == "uos": + if item.tag == "user_vm": post_vm_list.append(int(item.attrib['id'])) return post_vm_list @@ -205,11 +205,11 @@ def is_config_file_match(): return (err_dic, match) -def get_vm_uuid_idx(vm_type, uosid): +def get_vm_uuid_idx(vm_type, user_vmid): i_cnt = 0 for vm_i,vm_t in common.VM_TYPES.items(): - if vm_t == vm_type and vm_i <= uosid: + if vm_t == vm_type and vm_i <= user_vmid: i_cnt += 1 if i_cnt > 0: i_cnt -= 1 @@ -217,10 +217,10 @@ def get_vm_uuid_idx(vm_type, uosid): return i_cnt -def get_scenario_uuid(uosid, sos_vmid): +def get_scenario_uuid(user_vmid, sos_vmid): # {id_num:uuid} (id_num:0~max) scenario_uuid = '' - vm_id = uosid + sos_vmid + vm_id = user_vmid + sos_vmid i_cnt = get_vm_uuid_idx(common.VM_TYPES[vm_id], vm_id) scenario_uuid = scenario_cfg_lib.VM_DB[common.VM_TYPES[vm_id]]['uuid'][i_cnt] return scenario_uuid @@ -231,7 +231,7 @@ def get_sos_vmid(): sos_id = '' for vm_i,vm_type in common.VM_TYPES.items(): - if vm_type == "SOS_VM": + if vm_type == "SERVICE_VM": sos_id = vm_i break @@ -266,13 +266,13 @@ def get_vpid_from_bdf(bdf_vpid_map, bdf_list): return vpid_list -def get_uos_type(): +def get_user_vm_type(): """ - Get uos name from launch.xml at fist line + Get User VM name from launch.xml at fist line """ - uos_types = common.get_leaf_tag_map(common.LAUNCH_INFO_FILE, "uos_type") + user_vm_types = common.get_leaf_tag_map(common.LAUNCH_INFO_FILE, "user_vm_type") - return uos_types + return user_vm_types def is_bdf_format(bdf_str): @@ -314,7 +314,7 @@ def pt_devs_check(bdf_list, vpid_list, item): if is_bdf_format(bdf_str): continue else: - key = "uos:id={},passthrough_devices,{}".format(i_cnt, item) + key = "user_vm:id={},passthrough_devices,{}".format(i_cnt, item) ERR_LIST[key] = "Unkonw the BDF format of {} device".format(item) i_cnt += 1 @@ -324,7 +324,7 @@ def pt_devs_check(bdf_list, vpid_list, item): if is_vpid_format(vpid_str): continue else: - key = "uos:id={},passthrough_devices,{}".format(i_cnt, item) + key = "user_vm:id={},passthrough_devices,{}".format(i_cnt, item) ERR_LIST[key] = "Unkonw the Vendor:Product ID format of {} device".format(item) i_cnt += 1 @@ -337,7 +337,7 @@ def empty_err(i_cnt, item): :param item: the item of tag from config xml :return: None """ - key = "uos:id={},{}".format(i_cnt, item) + key = "user_vm:id={},{}".format(i_cnt, item) ERR_LIST[key] = "The parameter should not be empty" @@ -362,7 +362,7 @@ def args_aval_check(arg_list, item, avl_list): continue if arg_str not in avl_list: - key = "uos:id={},{}".format(i_cnt, item) + key = "user_vm:id={},{}".format(i_cnt, item) ERR_LIST[key] = "The {} is invalidate".format(item) i_cnt += 1 @@ -387,7 +387,7 @@ def mem_size_check(arg_list, item): mem_size_set = int(arg_str.strip()) if mem_size_set > total_mem_mb: - key = "uos:id={},{}".format(i_cnt, item) + key = "user_vm:id={},{}".format(i_cnt, item) ERR_LIST[key] = "{}MB should be less than total memory {}MB".format(item) i_cnt += 1 @@ -455,7 +455,7 @@ def pt_devs_check_audio(audio_map, audio_codec_map): bdf_audio = audio_map[vmid] bdf_codec = audio_codec_map[vmid] if not bdf_audio and bdf_codec: - key = "uos:id={},passthrough_devices,{}".format(vmid, 'audio_codec') + key = "user_vm:id={},passthrough_devices,{}".format(vmid, 'audio_codec') ERR_LIST[key] = "Audio codec device should be pass through together with Audio devcie!" @@ -498,7 +498,7 @@ def bdf_duplicate_check(bdf_dic): continue if dev_bdf in bdf_used: - key = "uos:id={},{},{}".format(vm_i, 'passthrough_devices', dev) + key = "user_vm:id={},{},{}".format(vm_i, 'passthrough_devices', dev) ERR_LIST[key] = "You select the same device for {} pass-through !".format(dev) return else: @@ -527,12 +527,12 @@ def get_gpu_vpid(): return vpid -def uos_cpu_affinity(uosid_cpu_affinity): +def user_vm_cpu_affinity(user_vmid_cpu_affinity): cpu_affinity = {} sos_vm_id = get_sos_vmid() - for uosid,cpu_affinity_list in uosid_cpu_affinity.items(): - cpu_affinity[int(uosid) + int(sos_vm_id)] = cpu_affinity_list + for user_vmid,cpu_affinity_list in user_vmid_cpu_affinity.items(): + cpu_affinity[int(user_vmid) + int(sos_vm_id)] = cpu_affinity_list return cpu_affinity @@ -541,33 +541,33 @@ def check_slot(slot_db): slot_values = {} # init list of slot values for Post VM for dev in slot_db.keys(): - for uosid in slot_db[dev].keys(): - slot_values[uosid] = [] + for user_vmid in slot_db[dev].keys(): + slot_values[user_vmid] = [] break # get slot values for Passthrough devices for dev in PASSTHRU_DEVS: - for uosid,slot_str in slot_db[dev].items(): + for user_vmid,slot_str in slot_db[dev].items(): if not slot_str: continue - slot_values[uosid].append(slot_str) + slot_values[user_vmid].append(slot_str) # update slot values and replace the fun=0 if there is no fun 0 in bdf list for dev in PASSTHRU_DEVS: - for uosid,slot_str in slot_db[dev].items(): + for user_vmid,slot_str in slot_db[dev].items(): if not slot_str or ':' not in str(slot_str): continue bus_slot = slot_str[0:-1] bus_slot_fun0 = bus_slot + "0" - if bus_slot_fun0 not in slot_values[uosid]: - slot_db[dev][uosid] = bus_slot_fun0 - slot_values[uosid].append(bus_slot_fun0) + if bus_slot_fun0 not in slot_values[user_vmid]: + slot_db[dev][user_vmid] = bus_slot_fun0 + slot_values[user_vmid].append(bus_slot_fun0) -def is_linux_like(uos_type): +def is_linux_like(user_vm_type): is_linux = False - if uos_type in LINUX_LIKE_OS: + if user_vm_type in LINUX_LIKE_OS: is_linux = True return is_linux @@ -584,11 +584,11 @@ def set_shm_regions(launch_item_values, scenario_info): sos_vm_id = 0 for vm_id, vm_type in vm_types.items(): - if vm_type in ['SOS_VM']: + if vm_type in ['SERVICE_VM']: sos_vm_id = vm_id elif vm_type in ['POST_STD_VM', 'POST_RT_VM', 'KATA_VM']: - uos_id = vm_id - sos_vm_id - shm_region_key = 'uos:id={},shm_regions,shm_region'.format(uos_id) + user_vmid = vm_id - sos_vm_id + shm_region_key = 'user_vm:id={},shm_regions,shm_region'.format(user_vmid) launch_item_values[shm_region_key] = [''] if shm_enabled == 'y': for shmem_region in raw_shmem_regions: @@ -607,16 +607,16 @@ def set_shm_regions(launch_item_values, scenario_info): def set_pci_vuarts(launch_item_values, scenario_info): try: - launch_item_values['uos,console_vuart'] = DM_VUART0 + launch_item_values['user_vm,console_vuart'] = DM_VUART0 vm_types = common.get_leaf_tag_map(scenario_info, 'vm_type') sos_vm_id = 0 for vm_id, vm_type in vm_types.items(): - if vm_type in ['SOS_VM']: + if vm_type in ['SERVICE_VM']: sos_vm_id = vm_id for vm in list(common.get_config_root(scenario_info)): if vm.tag == 'vm' and scenario_cfg_lib.VM_DB[vm_types[int(vm.attrib['id'])]]['load_type'] == 'POST_LAUNCHED_VM': - uos_id = int(vm.attrib['id']) - sos_vm_id - pci_vuart_key = 'uos:id={},communication_vuarts,communication_vuart'.format(uos_id) + user_vmid = int(vm.attrib['id']) - sos_vm_id + pci_vuart_key = 'user_vm:id={},communication_vuarts,communication_vuart'.format(user_vmid) for elem in list(vm): if elem.tag == 'communication_vuart': for sub_elem in list(elem): @@ -633,8 +633,8 @@ def check_shm_regions(launch_shm_regions, scenario_info): launch_item_values = {} set_shm_regions(launch_item_values, scenario_info) - for uos_id, shm_regions in launch_shm_regions.items(): - shm_region_key = 'uos:id={},shm_regions,shm_region'.format(uos_id) + for user_vmid, shm_regions in launch_shm_regions.items(): + shm_region_key = 'user_vm:id={},shm_regions,shm_region'.format(user_vmid) for shm_region in shm_regions: if shm_region_key not in launch_item_values.keys() or shm_region not in launch_item_values[shm_region_key]: ERR_LIST[shm_region_key] = "shm {} should be configured in scenario setting and the size should be decimal" \ @@ -645,15 +645,15 @@ def check_shm_regions(launch_shm_regions, scenario_info): def check_console_vuart(launch_console_vuart, vuart0, scenario_info): vuarts = common.get_vuart_info(scenario_info) - for uos_id, console_vuart_enable in launch_console_vuart.items(): - key = 'uos:id={},console_vuart'.format(uos_id) - if console_vuart_enable == "Enable" and vuart0[uos_id] == "Enable": - ERR_LIST[key] = "vuart0 and console_vuart of uos {} should not be enabled " \ - "at the same time".format(uos_id) + for user_vmid, console_vuart_enable in launch_console_vuart.items(): + key = 'user_vm:id={},console_vuart'.format(user_vmid) + if console_vuart_enable == "Enable" and vuart0[user_vmid] == "Enable": + ERR_LIST[key] = "vuart0 and console_vuart of user_vm {} should not be enabled " \ + "at the same time".format(user_vmid) return - if console_vuart_enable == "Enable" and int(uos_id) in vuarts.keys() \ - and 0 in vuarts[uos_id] and vuarts[uos_id][0]['base'] == "INVALID_PCI_BASE": - ERR_LIST[key] = "console_vuart of uos {} should be enabled in scenario setting".format(uos_id) + if console_vuart_enable == "Enable" and int(user_vmid) in vuarts.keys() \ + and 0 in vuarts[user_vmid] and vuarts[user_vmid][0]['base'] == "INVALID_PCI_BASE": + ERR_LIST[key] = "console_vuart of user_vm {} should be enabled in scenario setting".format(user_vmid) return @@ -661,25 +661,25 @@ def check_communication_vuart(launch_communication_vuarts, scenario_info): vuarts = common.get_vuart_info(scenario_info) vuart1_setting = common.get_vuart_info_id(common.SCENARIO_INFO_FILE, 1) - for uos_id, vuart_list in launch_communication_vuarts.items(): - vuart_key = 'uos:id={},communication_vuarts,communication_vuart'.format(uos_id) + for user_vmid, vuart_list in launch_communication_vuarts.items(): + vuart_key = 'user_vm:id={},communication_vuarts,communication_vuart'.format(user_vmid) for vuart_id in vuart_list: if not vuart_id: return - if int(vuart_id) not in vuarts[uos_id].keys(): - ERR_LIST[vuart_key] = "communication_vuart {} of uos {} should be configured" \ - "in scenario setting.".format(vuart_id, uos_id) + if int(vuart_id) not in vuarts[user_vmid].keys(): + ERR_LIST[vuart_key] = "communication_vuart {} of user_vm {} should be configured" \ + "in scenario setting.".format(vuart_id, user_vmid) return - if int(vuart_id) == 1 and vuarts[uos_id][1]['base'] != "INVALID_PCI_BASE": - if uos_id in vuart1_setting.keys() and vuart1_setting[uos_id]['base'] != "INVALID_COM_BASE": - ERR_LIST[vuart_key] = "uos {}'s communication_vuart 1 and legacy_vuart 1 should " \ - "not be configured at the same time.".format(uos_id) + if int(vuart_id) == 1 and vuarts[user_vmid][1]['base'] != "INVALID_PCI_BASE": + if user_vmid in vuart1_setting.keys() and vuart1_setting[user_vmid]['base'] != "INVALID_COM_BASE": + ERR_LIST[vuart_key] = "user_vm {}'s communication_vuart 1 and legacy_vuart 1 should " \ + "not be configured at the same time.".format(user_vmid) return def check_enable_ptm(launch_enable_ptm, scenario_info): scenario_etree = lxml.etree.parse(scenario_info) enable_ptm_vm_list = scenario_etree.xpath("//vm[PTM = 'y']/@id") - for uos_id, enable_ptm in launch_enable_ptm.items(): - key = 'uos:id={},enable_ptm'.format(uos_id) - if enable_ptm == 'y' and str(uos_id) not in enable_ptm_vm_list: - ERR_LIST[key] = "PTM of uos:{} set to 'n' in scenario xml".format(uos_id) + for user_vmid, enable_ptm in launch_enable_ptm.items(): + key = 'user_vm:id={},enable_ptm'.format(user_vmid) + if enable_ptm == 'y' and str(user_vmid) not in enable_ptm_vm_list: + ERR_LIST[key] = "PTM of user_vm:{} set to 'n' in scenario xml".format(user_vmid) diff --git a/misc/config_tools/library/scenario_cfg_lib.py b/misc/config_tools/library/scenario_cfg_lib.py index 6266d4d92..6948f7751 100644 --- a/misc/config_tools/library/scenario_cfg_lib.py +++ b/misc/config_tools/library/scenario_cfg_lib.py @@ -8,7 +8,7 @@ import common import board_cfg_lib HEADER_LICENSE = common.open_license() -SOS_UART1_VALID_NUM = "" +SERVICE_VM_UART1_VALID_NUM = "" NATIVE_TTYS_DIC = {} START_HPA_LIST = ['0', '0x100000000', '0x120000000'] @@ -18,7 +18,7 @@ KERN_BOOT_ADDR_LIST = ['0x100000'] VUART_TYPE = ['VUART_LEGACY_PIO', 'VUART_PCI'] INVALID_COM_BASE = 'INVALID_COM_BASE' -VUART_BASE = ['SOS_COM1_BASE', 'SOS_COM2_BASE', 'SOS_COM3_BASE', 'SOS_COM4_BASE', 'COM1_BASE', +VUART_BASE = ['SERVICE_VM_COM1_BASE', 'SERVICE_VM_COM2_BASE', 'SERVICE_VM_COM3_BASE', 'SERVICE_VM_COM4_BASE', 'COM1_BASE', 'COM2_BASE', 'COM3_BASE', 'COM4_BASE', 'CONFIG_COM_BASE', INVALID_COM_BASE] INVALID_PCI_BASE = 'INVALID_PCI_BASE' PCI_VUART = 'PCI_VUART' @@ -27,7 +27,7 @@ PCI_VUART_BASE = [PCI_VUART, INVALID_PCI_BASE] AVALIBLE_COM1_BASE = [INVALID_COM_BASE, 'COM1_BASE'] AVALIBLE_COM2_BASE = [INVALID_COM_BASE, 'COM2_BASE'] -VUART_IRQ = ['SOS_COM1_IRQ', 'SOS_COM2_IRQ', 'SOS_COM3_IRQ', 'SOS_COM4_IRQ', +VUART_IRQ = ['SERVICE_VM_COM1_IRQ', 'SERVICE_VM_COM2_IRQ', 'SERVICE_VM_COM3_IRQ', 'SERVICE_VM_COM4_IRQ', 'COM1_IRQ', 'COM2_IRQ', 'COM3_IRQ', 'COM4_IRQ', 'CONFIG_COM_IRQ', '0'] # Support 512M, 1G, 2G @@ -46,7 +46,7 @@ PT_SUB_PCI['sata'] = ['SATA controller'] PT_SUB_PCI['nvme'] = ['Non-Volatile memory controller'] PT_SUB_PCI['usb'] = ['USB controller'] UUID_DB = { - 'SOS_VM':['dbbbd434-7a57-4216-a12c-2201f1ab0240'], + 'SERVICE_VM':['dbbbd434-7a57-4216-a12c-2201f1ab0240'], 'SAFETY_VM':['fc836901-8685-4bc0-8b71-6e31dc36fa47'], 'PRE_STD_VM':['26c5e0d8-8f8a-47d8-8109-f201ebd61a5e', 'dd87ce08-66f9-473d-bc58-7605837f935e'], 'POST_STD_VM':['d2795438-25d6-11e8-864e-cb7a18b34643', '615db82a-e189-4b4f-8dbb-d321343e4ab3', @@ -57,7 +57,7 @@ UUID_DB = { } VM_DB = { - 'SOS_VM':{'load_type':'SOS_VM', 'severity':'SEVERITY_SERVICE_VM', 'uuid':UUID_DB['SOS_VM']}, + 'SERVICE_VM':{'load_type':'SERVICE_VM', 'severity':'SEVERITY_SERVICE_VM', 'uuid':UUID_DB['SERVICE_VM']}, 'SAFETY_VM':{'load_type':'PRE_LAUNCHED_VM', 'severity':'SEVERITY_SAFETY_VM', 'uuid':UUID_DB['SAFETY_VM']}, 'PRE_RT_VM':{'load_type':'PRE_LAUNCHED_VM', 'severity':'SEVERITY_RTVM', 'uuid':UUID_DB['PRE_RT_VM']}, 'PRE_STD_VM':{'load_type':'PRE_LAUNCHED_VM', 'severity':'SEVERITY_STANDARD_VM', 'uuid':UUID_DB['PRE_STD_VM']}, @@ -200,7 +200,7 @@ def get_pci_dev_num_per_vm(): if shmem_enabled == 'y' and vm_i in shmem_num.keys(): shmem_num_i = shmem_num[vm_i] pci_dev_num_per_vm[vm_i] = pt_pci_num[vm_i] + shmem_num_i + vuarts_num[vm_i] - elif "SOS_VM" == VM_DB[vm_type]['load_type']: + elif "SERVICE_VM" == VM_DB[vm_type]['load_type']: shmem_num_i = 0 if shmem_enabled == 'y' and vm_i in shmem_num.keys(): shmem_num_i = shmem_num[vm_i] @@ -211,7 +211,7 @@ def get_pci_dev_num_per_vm(): def check_board_private_info(): - if 'SOS_VM' not in common.VM_TYPES.values(): + if 'SERVICE_VM' not in common.VM_TYPES.values(): return branch_tag = "board_private" private_info = {} @@ -262,7 +262,7 @@ def load_vm_check(load_vms, item): key = "vm:id={},{}".format(order_i, item) ERR_LIST[key] = "VM load order unknown" - if "SOS_VM" == VM_DB[load_str]['load_type']: + if "SERVICE_VM" == VM_DB[load_str]['load_type']: sos_vm_ids.append(order_i) if "PRE_LAUNCHED_VM" == VM_DB[load_str]['load_type']: @@ -290,7 +290,7 @@ def load_vm_check(load_vms, item): if len(sos_vm_ids) > 1: key = "vm:id={},{}".format(sos_vm_ids[0], item) - ERR_LIST[key] = "SOS VM number should not be greater than 1" + ERR_LIST[key] = "Service VM number should not be greater than 1" return if len(post_vm_ids) > len(UUID_DB["POST_STD_VM"]): @@ -307,12 +307,12 @@ def load_vm_check(load_vms, item): if post_vm_ids and sos_vm_ids: if post_vm_ids[0] < sos_vm_ids[-1]: key = "vm:id={},{}".format(post_vm_ids[0], item) - ERR_LIST[key] = "Post vm should be configured after SOS_VM" + ERR_LIST[key] = "Post vm should be configured after SERVICE_VM" if pre_vm_ids and sos_vm_ids: if sos_vm_ids[-1] < pre_vm_ids[-1]: key = "vm:id={},{}".format(sos_vm_ids[0], item) - ERR_LIST[key] = "Pre vm should be configured before SOS_VM" + ERR_LIST[key] = "Pre vm should be configured before SERVICE_VM" def get_load_vm_cnt(load_vms, type_name): @@ -369,7 +369,7 @@ def vm_cpu_affinity_check(config_file, id_cpus_per_vm_dic, item): elif VM_DB[vm_type]['load_type'] == "POST_LAUNCHED_VM": cpus = [x for x in id_cpus_per_vm_dic[vm_i] if not None] post_launch_cpus.extend(cpus) - elif VM_DB[vm_type]['load_type'] == "SOS_VM": + elif VM_DB[vm_type]['load_type'] == "SERVICE_VM": cpus = [x for x in id_cpus_per_vm_dic[vm_i] if not None] sos_vm_cpus.extend(cpus) @@ -382,9 +382,9 @@ def vm_cpu_affinity_check(config_file, id_cpus_per_vm_dic, item): return err_dic if pre_launch_cpus: - if "SOS_VM" in common.VM_TYPES and not sos_vm_cpus: - key = "SOS VM cpu_affinity" - err_dic[key] = "Should assign CPU id for SOS VM" + if "SERVICE_VM" in common.VM_TYPES and not sos_vm_cpus: + key = "Service VM cpu_affinity" + err_dic[key] = "Should assign CPU id for Service VM" for pcpu in pre_launch_cpus: if pre_launch_cpus.count(pcpu) >= 2: @@ -501,7 +501,7 @@ def os_kern_args_check(id_kern_args_dic, prime_item, item): if vm_i not in id_kern_args_dic.keys(): continue kern_args = id_kern_args_dic[vm_i] - if "SOS_" in vm_type and kern_args != "SERVICE_VM_OS_BOOTARGS": + if "SERVICE_" in vm_type and kern_args != "SERVICE_VM_OS_BOOTARGS": key = "vm:id={},{},{}".format(vm_i, prime_item, item) ERR_LIST[key] = "VM os config kernel service os should be SERVICE_VM_OS_BOOTARGS" @@ -596,7 +596,7 @@ def cpus_assignment(cpus_per_vm, index): :return: cpu assignment string """ vm_cpu_bmp = {} - if "SOS_VM" == common.VM_TYPES[index]: + if "SERVICE_VM" == common.VM_TYPES[index]: if index not in cpus_per_vm or cpus_per_vm[index] == [None]: sos_extend_all_cpus = board_cfg_lib.get_processor_info() pre_all_cpus = [] @@ -656,11 +656,11 @@ def avl_vuart_ui_select(scenario_info): tmp_vuart = {} for vm_i,vm_type in common.VM_TYPES.items(): - if "SOS_VM" == VM_DB[vm_type]['load_type']: + if "SERVICE_VM" == VM_DB[vm_type]['load_type']: key = "vm={},legacy_vuart=0,base".format(vm_i) - tmp_vuart[key] = ['SOS_COM1_BASE', 'INVALID_COM_BASE'] + tmp_vuart[key] = ['SERVICE_VM_COM1_BASE', 'INVALID_COM_BASE'] key = "vm={},legacy_vuart=1,base".format(vm_i) - tmp_vuart[key] = ['SOS_COM2_BASE', 'INVALID_COM_BASE'] + tmp_vuart[key] = ['SERVICE_VM_COM2_BASE', 'INVALID_COM_BASE'] else: key = "vm={},legacy_vuart=0,base".format(vm_i) tmp_vuart[key] = ['INVALID_COM_BASE', 'COM1_BASE'] @@ -709,7 +709,7 @@ def check_vuart(v0_vuart, v1_vuart): if not vuart_dic['base'] or vuart_dic['base'] not in VUART_BASE: key = "vm:id={},legacy_vuart:id=1,base".format(vm_i) - ERR_LIST[key] = "base should be SOS/COM BASE" + ERR_LIST[key] = "base should be Service VM/COM BASE" if vuart_dic['base'] == "INVALID_COM_BASE": continue @@ -1293,7 +1293,7 @@ def get_sos_vuart_settings(launch_flag=True): Get vuart setting from scenario setting :return: vuart0/vuart1 setting dictionary """ - global SOS_UART1_VALID_NUM + global SERVICE_VM_UART1_VALID_NUM err_dic = {} vuart0_setting = {} vuart1_setting = {} @@ -1301,7 +1301,7 @@ def get_sos_vuart_settings(launch_flag=True): (err_dic, ttys_n) = board_cfg_lib.parser_hv_console() if err_dic: if launch_flag: - SOS_UART1_VALID_NUM += "ttyS1" + SERVICE_VM_UART1_VALID_NUM += "ttyS1" return return err_dic @@ -1321,11 +1321,11 @@ def get_sos_vuart_settings(launch_flag=True): vuart1_valid = ['ttyS1'] if launch_flag: - SOS_UART1_VALID_NUM += vuart1_valid[0] + SERVICE_VM_UART1_VALID_NUM += vuart1_valid[0] return # VUART1 setting - # The IRQ of vUART1(COM2) might be hard-coded by SOS ACPI table(i.e. host ACPI), + # The IRQ of vUART1(COM2) might be hard-coded by Service VM ACPI table(i.e. host ACPI), # so we had better follow native COM2 IRQ assignment for vUART1 if COM2 is a legacy ttyS, # otherwise function of vUART1 would be failed. If host COM2 does not exist or it is a PCI ttyS, # then we could allocate a free IRQ for vUART1. diff --git a/misc/config_tools/scenario_config/pci_dev_c.py b/misc/config_tools/scenario_config/pci_dev_c.py index ea143027b..57d23d222 100644 --- a/misc/config_tools/scenario_config/pci_dev_c.py +++ b/misc/config_tools/scenario_config/pci_dev_c.py @@ -167,10 +167,10 @@ def generate_file(vm_info, config): # Skip this vm if there is no any pci device and virtual device if not scenario_cfg_lib.get_pci_dev_num_per_vm()[vm_i] and \ - scenario_cfg_lib.VM_DB[vm_type]['load_type'] != "SOS_VM": + scenario_cfg_lib.VM_DB[vm_type]['load_type'] != "SERVICE_VM": continue if not scenario_cfg_lib.get_pci_dev_num_per_vm()[vm_i] and \ - scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": print("", file=config) print("struct acrn_vm_pci_dev_config " + "sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];", file=config) @@ -179,7 +179,7 @@ def generate_file(vm_info, config): pci_cnt = 1 # Insert device structure and bracket print("", file=config) - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": print("struct acrn_vm_pci_dev_config " + "sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM] = {", file=config) else: @@ -242,7 +242,7 @@ def generate_file(vm_info, config): print("\t{", file=config) print("\t\t.emu_type = {},".format(PCI_DEV_TYPE[0]), file=config) - if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": free_bdf = find_unused_bdf(sos_used_bdf, "ivshmem", last_bdf) last_bdf = free_bdf print("\t\t.vbdf.bits = {{.b = 0x00U, .d = 0x{:02x}U, .f = 0x{:02x}U}}," \ @@ -263,7 +263,7 @@ def generate_file(vm_info, config): if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "PRE_LAUNCHED_VM": print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{},".format(region), file=config) print("\t\tIVSHMEM_DEVICE_{}_VBAR,".format(index), file=config) - elif scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + elif scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{},".format(region), file=config) print("\t\tSOS_IVSHMEM_DEVICE_{}_VBAR,".format(index), file=config) else: @@ -305,7 +305,7 @@ def generate_file(vm_info, config): if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "PRE_LAUNCHED_VM": free_bdf = find_unused_bdf(vm_used_bdf, "vuart", last_bdf) vm_used_bdf.append(free_bdf) - elif scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": + elif scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SERVICE_VM": free_bdf = find_unused_bdf(sos_used_bdf, "vuart", last_bdf) sos_used_bdf.append(free_bdf) print("\t\t.vbdf.bits = {{.b = 0x00U, .d = 0x{:02x}U, .f = 0x00U}},".format(free_bdf.dev,free_bdf.func), file=config) diff --git a/misc/config_tools/scenario_config/scenario_item.py b/misc/config_tools/scenario_config/scenario_item.py index 662af1a1b..9886c91a2 100644 --- a/misc/config_tools/scenario_config/scenario_item.py +++ b/misc/config_tools/scenario_config/scenario_item.py @@ -271,7 +271,7 @@ class LoadOrderNum: def get_info(self, load_vm): self.pre_vm = scenario_cfg_lib.get_load_vm_cnt(load_vm, "PRE_LAUNCHED_VM") - self.sos_vm = scenario_cfg_lib.get_load_vm_cnt(load_vm, "SOS_VM") + self.sos_vm = scenario_cfg_lib.get_load_vm_cnt(load_vm, "SERVICE_VM") self.post_vm = scenario_cfg_lib.get_load_vm_cnt(load_vm, "POST_LAUNCHED_VM") diff --git a/misc/config_tools/scenario_config/vm_configurations_c.py b/misc/config_tools/scenario_config/vm_configurations_c.py index 22b140bb0..532f89b66 100644 --- a/misc/config_tools/scenario_config/vm_configurations_c.py +++ b/misc/config_tools/scenario_config/vm_configurations_c.py @@ -53,22 +53,22 @@ def vuart0_output(i, vm_type, vm_info, config): :param config: it is the pointer which file write to :return: None """ - # SOS_VM vuart[0] + # Servce VM vuart[0] print("\t\t.vuart[0] = {", file=config) print("\t\t\t.type = {0},".format(vm_info.vuart.v0_vuart[i]['type']), file=config) if vm_info.vuart.v0_vuart[i]['base'] == "INVALID_COM_BASE": print("\t\t\t.addr.port_base = INVALID_COM_BASE,", file=config) - if "SOS_" in vm_type: - print("\t\t\t.irq = SOS_COM1_IRQ,", file=config) + if "SERVICE_" in vm_type: + print("\t\t\t.irq = SERVICE_VM_COM1_IRQ,", file=config) elif "PRE_LAUNCHED_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: print("\t\t\t.irq = COM1_IRQ,", file=config) elif "POST_LAUNCHED_VM" in scenario_cfg_lib.VM_DB[vm_type]['load_type']: print("\t\t\t.irq = {0},".format( vm_info.vuart.v0_vuart[i]['irq']), file=config) else: - if "SOS_" in vm_type: - print("\t\t\t.addr.port_base = SOS_COM1_BASE,", file=config) - print("\t\t\t.irq = SOS_COM1_IRQ,", file=config) + if "SERVICE_" in vm_type: + print("\t\t\t.addr.port_base = SERVICE_VM_COM1_BASE,", file=config) + print("\t\t\t.irq = SERVICE_VM_COM1_IRQ,", file=config) elif "PRE_LAUNCHED_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: print("\t\t\t.addr.port_base = COM1_BASE,", file=config) print("\t\t\t.irq = COM1_IRQ,", file=config) @@ -119,9 +119,9 @@ def vuart1_output(i, vm_type, vuart1_vmid_dic, vm_info, config): print("\t\t\t.addr.port_base = INVALID_COM_BASE,", file=config) if vuart1_vmid_dic and i in vuart1_vmid_dic.keys(): - if "SOS_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: + if "SERVICE_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: if vm_info.vuart.v1_vuart[i]['base'] != "INVALID_COM_BASE" and vuart_enable[i]: - print("\t\t\t.irq = SOS_COM2_IRQ,", file=config) + print("\t\t\t.irq = SERVICE_VM_COM2_IRQ,", file=config) else: if vm_info.vuart.v1_vuart[i]['base'] != "INVALID_COM_BASE" and vuart_enable[i]: print("\t\t\t.irq = COM2_IRQ,", file=config) @@ -156,11 +156,11 @@ def is_need_epc(epc_section, i, config): :param config: it is file pointer to store the information :return: None """ - # SOS_VM have not set epc section + # Service_VM have not set epc section if i not in common.VM_TYPES.keys(): return vm_type = list(common.VM_TYPES.values())[i] - if "SOS_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: + if "SERVICE_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: return if epc_section.base[i] == '0' and epc_section.size[i] == '0': @@ -180,8 +180,8 @@ def cpu_affinity_output(vm_info, i, config): :param config: file pointor to store the information """ - if "SOS_VM" == common.VM_TYPES[i]: - print("\t\t.cpu_affinity = SOS_VM_CONFIG_CPU_AFFINITY,", file=config) + if "SERVICE_VM" == common.VM_TYPES[i]: + print("\t\t.cpu_affinity = SERVICE_VM_CONFIG_CPU_AFFINITY,", file=config) else: print("\t\t.cpu_affinity = VM{}_CONFIG_CPU_AFFINITY,".format(i), file=config) @@ -249,10 +249,10 @@ def gen_sos_vm(vm_type, vm_i, scenario_items, config): return err_dic print("\t{{\t/* VM{} */".format(vm_i), file=config) - print("\t\tCONFIG_SOS_VM,", file=config) + print("\t\tCONFIG_SERVICE_VM,", file=config) print('\t\t.name = "{0}",'.format(vm_info.name[vm_i]), file=config) print("", file=config) - print("\t\t/* Allow SOS to reboot the host since " + + print("\t\t/* Allow Service VM to reboot the host since " + "there is supposed to be the highest severity guest */", file=config) if sos_guest_flags: print("\t\t.guest_flags = {0},".format(sos_guest_flags), file=config) @@ -386,7 +386,7 @@ def gen_post_launch_vm(vm_type, vm_i, scenario_items, config): def declare_pci_devs(vm_info, config): for vm_i,vm_type in common.VM_TYPES.items(): - if vm_type == "SOS_VM": + if vm_type == "SERVICE_VM": print("extern struct acrn_vm_pci_dev_config " + "sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];", file=config) continue @@ -418,7 +418,7 @@ def generate_file(scenario_items, config): print("struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {", file=config) for vm_i, vm_type in common.VM_TYPES.items(): - if "SOS_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: + if "SERVICE_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: gen_sos_vm(vm_type, vm_i, scenario_items, config) elif "PRE_LAUNCHED_VM" == scenario_cfg_lib.VM_DB[vm_type]['load_type']: gen_pre_launch_vm(vm_type, vm_i, scenario_items, config) diff --git a/misc/config_tools/scenario_config/vm_configurations_h.py b/misc/config_tools/scenario_config/vm_configurations_h.py index 21268c019..789804e7e 100644 --- a/misc/config_tools/scenario_config/vm_configurations_h.py +++ b/misc/config_tools/scenario_config/vm_configurations_h.py @@ -63,17 +63,17 @@ def gen_pre_launch_vm(scenario_items, config): def gen_sos_header(scenario_items, config): - if 'SOS_VM' not in common.VM_TYPES.values(): + if 'SERVICE_VM' not in common.VM_TYPES.values(): return for vm_i,vm_type in common.VM_TYPES.items(): - if vm_type == 'SOS_VM': - print("/* SOS_VM == VM{0} */".format(vm_i), file=config) + if vm_type == 'SERVICE_VM': + print("/* SERVICE_VM == VM{0} */".format(vm_i), file=config) print("#define SERVICE_VM_OS_BOOTARGS\t\t\tSERVICE_VM_ROOTFS\t\\", file=config) print("\t\t\t\t\tSERVICE_VM_OS_CONSOLE\t\\", file=config) print("\t\t\t\t\tSERVICE_VM_IDLE\t\\", file=config) - print("\t\t\t\t\tSOS_BOOTARGS_DIFF", file=config) + print("\t\t\t\t\tSERVICE_VM_BOOTARGS_DIFF", file=config) print("", file=config) @@ -87,7 +87,7 @@ def gen_header_file(scenario_items, config): def get_dm_owned_guest_flag_mask(vm_info, config): print("", file=config) - if "SOS_VM" not in common.VM_TYPES.values(): + if "SERVICE_VM" not in common.VM_TYPES.values(): print("#define DM_OWNED_GUEST_FLAG_MASK 0UL", file=config) else: print("/* Bits mask of guest flags that can be programmed by device model." + diff --git a/misc/config_tools/schema/VMtypes.xsd b/misc/config_tools/schema/VMtypes.xsd index 4541ec79d..a39ead6ac 100644 --- a/misc/config_tools/schema/VMtypes.xsd +++ b/misc/config_tools/schema/VMtypes.xsd @@ -10,13 +10,13 @@ - ``SAFETY_VM`` pre-launched Safety VM - ``PRE_STD_VM`` pre-launched Standard VM - ``PRE_RT_VM`` pre-launched real-time capable VM -- ``SOS_VM`` pre-launched Service VM +- ``SERVICE_VM`` pre-launched Service VM - ``POST_STD_VM`` post-launched Standard VM - ``POST_RT_VM`` post-launched real-time capable VM - ``KATA_VM`` post-launched Kata Container VM - + @@ -224,16 +224,16 @@ must exactly match the module tag in the GRUB multiboot cmdline. - A string with either ``SOS_COM1_BASE``, -``SOS_COM2_BASE``, ``SOS_COM3_BASE``, ``SOS_COM4_BASE``, + A string with either ``SERVICE_VM_COM1_BASE``, +``SERVICE_VM_COM2_BASE``, ``SERVICE_VM_COM3_BASE``, ``SERVICE_VM_COM4_BASE``, ``COM1_BASE``, ``COM2_BASE``, ``COM3_BASE``, ``COM4_BASE``, ``CONFIG_COM_BASE``, or indicating it's disabled with ``INVALID_COM_BASE``. - - - - + + + + @@ -245,17 +245,17 @@ must exactly match the module tag in the GRUB multiboot cmdline. - A string with either ``SOS_COM1_IRQ``, -``SOS_COM2_IRQ``, ``SOS_COM3_IRQ``, ``SOS_COM4_IRQ``, + A string with either ``SERVICE_VM_COM1_IRQ``, +``SERVICE_VM_COM2_IRQ``, ``SERVICE_VM_COM3_IRQ``, ``SERVICE_VM_COM4_IRQ``, ``COM1_IRQ``, ``COM2_IRQ``, ``COM3_IRQ``, ``COM4_IRQ``, ``CONFIG_COM_IRQ`` or ``0``. If ``0`` is set, the vuart will use polling mode. - - - - + + + + @@ -276,7 +276,7 @@ supported. vUART (COM) enabling switch. Enable by exposing its COM_BASE -(e.b., ``SOS_COM1_BASE`` for Service VM); disable by returning +(e.b., ``SERVICE_VM_COM1_BASE`` for Service VM); disable by returning ``INVALID_COM_BASE``. diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd index 49e1617fc..3fcb47ab5 100644 --- a/misc/config_tools/schema/config.xsd +++ b/misc/config_tools/schema/config.xsd @@ -25,7 +25,7 @@ hypervisor shell. Specify the host serial device used for hypervisor debugging. This option is only valid if :option:`hv.DEBUG_OPTIONS.RELEASE` is set to ``n``. -This option impacts the content of ``vm.(legacy_vuart id="0").base`` when :option:`vm.vm_type` is ``SOS_VM``, +This option impacts the content of ``vm.(legacy_vuart id="0").base`` when :option:`vm.vm_type` is ``SERVICE_VM``, which specifies the PIO base for Service VM legacy vUART 0 (used for the console). The PIO base for the Service VM's legacy vUART 0 is determined using these rules: @@ -453,9 +453,9 @@ its ``id`` attribute. When it is enabled, specify which target VM's vUART the cu - + - SOS cannot use LAPIC passthrough unless GUEST_FLAG_NVMX_ENABLED is set. + Service VM cannot use LAPIC passthrough unless GUEST_FLAG_NVMX_ENABLED is set. diff --git a/misc/config_tools/static_allocators/cpu_affinity.py b/misc/config_tools/static_allocators/cpu_affinity.py index 099351a11..00b4f1486 100644 --- a/misc/config_tools/static_allocators/cpu_affinity.py +++ b/misc/config_tools/static_allocators/cpu_affinity.py @@ -10,10 +10,10 @@ sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', ' import common, board_cfg_lib def sos_cpu_affinity(etree): - if common.get_node("//vm[vm_type = 'SOS_VM']", etree) is None: + if common.get_node("//vm[vm_type = 'SERVICE_VM']", etree) is None: return None - if common.get_node("//vm[vm_type = 'SOS_VM' and count(cpu_affinity)]", etree) is not None: + if common.get_node("//vm[vm_type = 'SERVICE_VM' and count(cpu_affinity)]", etree) is not None: return None sos_extend_all_cpus = board_cfg_lib.get_processor_info() @@ -25,12 +25,12 @@ def sos_cpu_affinity(etree): def fn(board_etree, scenario_etree, allocation_etree): cpus_for_sos = sos_cpu_affinity(scenario_etree) if cpus_for_sos: - if common.get_node("//vm[vm_type = 'SOS_VM']", scenario_etree) is not None: - vm_id = common.get_node("//vm[vm_type = 'SOS_VM']/@id", scenario_etree) + if common.get_node("//vm[vm_type = 'SERVICE_VM']", scenario_etree) is not None: + vm_id = common.get_node("//vm[vm_type = 'SERVICE_VM']/@id", scenario_etree) allocation_sos_vm_node = common.get_node(f"/acrn-config/vm[@id='{vm_id}']", allocation_etree) if allocation_sos_vm_node is None: allocation_sos_vm_node = common.append_node("/acrn-config/vm", None, allocation_etree, id = vm_id) if common.get_node("./vm_type", allocation_sos_vm_node) is None: - common.append_node("./vm_type", "SOS_VM", allocation_sos_vm_node) + common.append_node("./vm_type", "SERVICE_VM", allocation_sos_vm_node) for pcpu_id in cpus_for_sos: common.append_node("./cpu_affinity/pcpu_id", str(pcpu_id), allocation_sos_vm_node) diff --git a/misc/config_tools/static_allocators/gpa.py b/misc/config_tools/static_allocators/gpa.py index 42721fa4c..140cdf722 100644 --- a/misc/config_tools/static_allocators/gpa.py +++ b/misc/config_tools/static_allocators/gpa.py @@ -434,7 +434,7 @@ def allocate_pci_bar(board_etree, scenario_etree, allocation_etree): mem_passthrough = get_devs_mem_passthrough(board_etree, scenario_etree) used_low_mem_native = get_devs_mem_native(board_etree, low_mem) used_high_mem_native = get_devs_mem_native(board_etree, high_mem) - # release the passthrough devices mmio windows from SOS + # release the passthrough devices mmio windows from Service VM used_low_mem = [mem for mem in used_low_mem_native if mem not in mem_passthrough] used_high_mem = [mem for mem in used_high_mem_native if mem not in mem_passthrough] else: @@ -464,7 +464,7 @@ def allocate_io_port(board_etree, scenario_etree, allocation_etree): io_port_range_list = io_port_range_list_native io_port_passthrough = get_pt_devs_io_port_passthrough(board_etree, scenario_etree) used_io_port_list_native = get_devs_io_port_native(board_etree, io_port_range_list_native) - # release the passthrough devices io port address from SOS + # release the passthrough devices io port address from Service VM used_io_port_list = [io_port for io_port in used_io_port_list_native if io_port not in io_port_passthrough] else: io_port_range_list = [AddrWindow(start = IO_PORT_THRESHOLD, end = IO_PORT_MAX_ADDRESS)] @@ -530,7 +530,7 @@ def pt_dev_io_port_passthrough(board_etree, scenario_etree, allocation_etree): | | +--------------------------------------------------+ <--Offset 0 - SOS VM gpa layout: + Service VM gpa layout: +--------------------------------------------------+ <--End of native high pci hole | 64 bits vbar of emulated PCI devices | +--------------------------------------------------+ <--Start of native high pci hole diff --git a/misc/config_tools/static_allocators/intx.py b/misc/config_tools/static_allocators/intx.py index cd862e5a1..6bc0c0c0b 100644 --- a/misc/config_tools/static_allocators/intx.py +++ b/misc/config_tools/static_allocators/intx.py @@ -53,13 +53,13 @@ def create_vuart_irq_node(etree, vm_id, vm_type, vuart_id, irq): def assign_legacy_vuart_irqs(vm_node, legacy_vuart_id, irq_list): legacy_vuart_node_irq_text = common.get_node(f"legacy_vuart[@id = '{legacy_vuart_id}']/irq/text()", vm_node) legacy_vuart_irq = '' - if legacy_vuart_node_irq_text == 'COM1_IRQ' or legacy_vuart_node_irq_text == 'SOS_COM1_IRQ' \ - or legacy_vuart_node_irq_text == 'COM3_IRQ' or legacy_vuart_node_irq_text == 'SOS_COM3_IRQ': + if legacy_vuart_node_irq_text == 'COM1_IRQ' or legacy_vuart_node_irq_text == 'SERVICE_VM_COM1_IRQ' \ + or legacy_vuart_node_irq_text == 'COM3_IRQ' or legacy_vuart_node_irq_text == 'SERVICE_VM_COM3_IRQ': legacy_vuart_irq = '4' if legacy_vuart_irq in irq_list: remove_irq(irq_list, legacy_vuart_irq) - elif legacy_vuart_node_irq_text == 'COM2_IRQ' or legacy_vuart_node_irq_text == 'SOS_COM2_IRQ' \ - or legacy_vuart_node_irq_text == 'COM4_IRQ' or legacy_vuart_node_irq_text == 'SOS_COM4_IRQ': + elif legacy_vuart_node_irq_text == 'COM2_IRQ' or legacy_vuart_node_irq_text == 'SERVICE_VM_COM2_IRQ' \ + or legacy_vuart_node_irq_text == 'COM4_IRQ' or legacy_vuart_node_irq_text == 'SERVICE_VM_COM4_IRQ': legacy_vuart_irq = '3' if legacy_vuart_irq in irq_list: remove_irq(irq_list, legacy_vuart_irq) @@ -76,11 +76,11 @@ def alloc_legacy_vuart_irqs(board_etree, scenario_etree, allocation_etree): vm_node_list = scenario_etree.xpath("//vm") for vm_node in vm_node_list: vm_type = common.get_node("./vm_type/text()", vm_node) - irq_list = get_native_valid_irq() if vm_type == "SOS_VM" else [f"{d}" for d in list(range(1,15))] + irq_list = get_native_valid_irq() if vm_type == "SERVICE_VM" else [f"{d}" for d in list(range(1,15))] legacy_vuart_id_list = vm_node.xpath("legacy_vuart[base != 'INVALID_COM_BASE']/@id") legacy_vuart_irq = '' for legacy_vuart_id in legacy_vuart_id_list: - if legacy_vuart_id == '0' and vm_type == "SOS_VM": + if legacy_vuart_id == '0' and vm_type == "SERVICE_VM": if hv_debug_console in native_ttys.keys(): if native_ttys[hv_debug_console]['irq'] < LEGACY_IRQ_MAX: legacy_vuart_irq = native_ttys[hv_debug_console]['irq'] diff --git a/misc/config_tools/static_allocators/lib/lib.py b/misc/config_tools/static_allocators/lib/lib.py index 93fd4b087..3a1918e24 100644 --- a/misc/config_tools/static_allocators/lib/lib.py +++ b/misc/config_tools/static_allocators/lib/lib.py @@ -13,7 +13,7 @@ from collections import namedtuple PRE_LAUNCHED_VMS_TYPE = ["SAFETY_VM", "PRE_RT_VM", "PRE_STD_VM"] POST_LAUNCHED_VMS_TYPE = ["POST_STD_VM", "POST_RT_VM", "KATA_VM"] -SOS_VM_TYPE = ["SOS_VM"] +SERVICE_VM_TYPE = ["SERVICE_VM"] class BusDevFunc(namedtuple( "BusDevFunc", [ @@ -123,6 +123,6 @@ def is_post_launched_vm(vm_type): return False def is_sos_vm(vm_type): - if vm_type in SOS_VM_TYPE: + if vm_type in SERVICE_VM_TYPE: return True return False diff --git a/misc/config_tools/static_allocators/pio.py b/misc/config_tools/static_allocators/pio.py index cbeeff3db..6a4d8c9d4 100644 --- a/misc/config_tools/static_allocators/pio.py +++ b/misc/config_tools/static_allocators/pio.py @@ -26,13 +26,13 @@ def remove_pio(pio_list, base): def assign_legacy_vuart_io_port(vm_node, legacy_vuart_id): legacy_vuart_base = "" legacy_vuart_node_base_text = common.get_node(f"./legacy_vuart[@id = '{legacy_vuart_id}']/base/text()", vm_node) - if legacy_vuart_node_base_text == 'COM1_BASE' or legacy_vuart_node_base_text == 'SOS_COM1_BASE': + if legacy_vuart_node_base_text == 'COM1_BASE' or legacy_vuart_node_base_text == 'SERVICE_VM_COM1_BASE': legacy_vuart_base = '0x3F8' - elif legacy_vuart_node_base_text == 'COM2_BASE' or legacy_vuart_node_base_text == 'SOS_COM2_BASE': + elif legacy_vuart_node_base_text == 'COM2_BASE' or legacy_vuart_node_base_text == 'SERVICE_VM_COM2_BASE': legacy_vuart_base = '0x2F8' - elif legacy_vuart_node_base_text == 'COM3_BASE' or legacy_vuart_node_base_text == 'SOS_COM3_BASE': + elif legacy_vuart_node_base_text == 'COM3_BASE' or legacy_vuart_node_base_text == 'SERVICE_VM_COM3_BASE': legacy_vuart_base = '0x3E8' - elif legacy_vuart_node_base_text == 'COM4_BASE' or legacy_vuart_node_base_text == 'SOS_COM4_BASE': + elif legacy_vuart_node_base_text == 'COM4_BASE' or legacy_vuart_node_base_text == 'SERVICE_VM_COM4_BASE': legacy_vuart_base = '0x2E8' return legacy_vuart_base @@ -56,7 +56,7 @@ def fn(board_etree, scenario_etree, allocation_etree): legacy_vuart_base = "" legacy_vuart_id_list = vm_node.xpath("legacy_vuart[base != 'INVALID_COM_BASE']/@id") for legacy_vuart_id in legacy_vuart_id_list: - if legacy_vuart_id == '0' and vm_type == "SOS_VM": + if legacy_vuart_id == '0' and vm_type == "SERVICE_VM": if hv_debug_console in native_ttys.keys(): if native_ttys[hv_debug_console]['type'] == "portio": legacy_vuart_base = native_ttys[hv_debug_console]['base'] diff --git a/misc/config_tools/xforms/lib.xsl b/misc/config_tools/xforms/lib.xsl index cc26ebddb..1f62babb8 100644 --- a/misc/config_tools/xforms/lib.xsl +++ b/misc/config_tools/xforms/lib.xsl @@ -435,7 +435,7 @@ - + diff --git a/misc/config_tools/xforms/misc_cfg.h.xsl b/misc/config_tools/xforms/misc_cfg.h.xsl index b880cd67f..ddcd75ab6 100644 --- a/misc/config_tools/xforms/misc_cfg.h.xsl +++ b/misc/config_tools/xforms/misc_cfg.h.xsl @@ -106,14 +106,14 @@ - + - + diff --git a/misc/config_tools/xforms/vm_configurations.c.xsl b/misc/config_tools/xforms/vm_configurations.c.xsl index a81b075de..851efd217 100644 --- a/misc/config_tools/xforms/vm_configurations.c.xsl +++ b/misc/config_tools/xforms/vm_configurations.c.xsl @@ -125,7 +125,7 @@ - + diff --git a/misc/config_tools/xforms/vm_configurations.h.xsl b/misc/config_tools/xforms/vm_configurations.h.xsl index d9802f104..e57b4e0dd 100644 --- a/misc/config_tools/xforms/vm_configurations.h.xsl +++ b/misc/config_tools/xforms/vm_configurations.h.xsl @@ -47,7 +47,7 @@ - + @@ -59,10 +59,10 @@ - - + + - + diff --git a/misc/debug_tools/acrn_crashlog/acrnprobe/android_events.c b/misc/debug_tools/acrn_crashlog/acrnprobe/android_events.c index 56c7e1f2f..46296dbc1 100644 --- a/misc/debug_tools/acrn_crashlog/acrnprobe/android_events.c +++ b/misc/debug_tools/acrn_crashlog/acrnprobe/android_events.c @@ -34,7 +34,7 @@ static const char *android_histpath = "logs/history_event"; char *loop_dev; /* Find the next event that needs to be synced. - * There is a history_event file in UOS side, it records UOS's events in + * There is a history_event file in User VM side, it records User VM's events in * real-time. Generally, the cursor point to the first unsynchronized line. */ static char *next_vm_event(const char *cursor, const char *data, @@ -161,7 +161,7 @@ static int get_vms_history(const struct sender_t *sender) * Stage2: push the recorded events to event_queue, the senders will do * the corresponding process. * - * The design reason is giving UOS some time to get log stored. + * The design reason is giving User VM some time to get log stored. */ static void detect_new_events(struct sender_t *sender) { @@ -350,7 +350,7 @@ static void get_last_evt_detected(struct sender_t *sender) static char *setup_loop_dev(void) { - /* Currently UOS image(/data/android/android.img) mounted by + /* Currently User VM image(/data/android/android.img) mounted by * launch_UOS.sh, we need mount its data partition to loop device */ char loop_dev_tmp[32]; diff --git a/misc/debug_tools/acrn_crashlog/acrnprobe/vmrecord.c b/misc/debug_tools/acrn_crashlog/acrnprobe/vmrecord.c index 4a04b9046..0874f1cbf 100644 --- a/misc/debug_tools/acrn_crashlog/acrnprobe/vmrecord.c +++ b/misc/debug_tools/acrn_crashlog/acrnprobe/vmrecord.c @@ -119,10 +119,10 @@ int vmrecord_gen_ifnot_exists(struct vmrecord_t *vmrecord) " * This file records VM id synced or about to be synched,\n" " * the tag:\n" " * \"<==\" indicates event waiting to sync.\n" - " * \"NOT_FOUND\" indicates event not found in UOS.\n" - " * \"MISS_LOGS\" indicates event miss logs in UOS.\n" + " * \"NOT_FOUND\" indicates event not found in User VM.\n" + " * \"MISS_LOGS\" indicates event miss logs in User VM.\n" " * \"ON_GOING\" indicates event is under syncing.\n" - " * \"NO_RESORC\" indicates no enough resources in SOS.\n" + " * \"NO_RESORC\" indicates no enough resources in Service VM.\n" " */\n\n"; if (!vmrecord) { diff --git a/misc/efi-stub/efilinux.h b/misc/efi-stub/efilinux.h index 14b13fd97..0514a92f1 100644 --- a/misc/efi-stub/efilinux.h +++ b/misc/efi-stub/efilinux.h @@ -195,7 +195,7 @@ handle_protocol(EFI_HANDLE handle, EFI_GUID *protocol, void **interface) /* * emalloc_reserved_mem - it is called to allocate memory hypervisor itself * and trampoline code, and mark the allocate memory as EfiReserved memory - * type so that SOS won't touch it during boot. + * type so that Service VM won't touch it during boot. * @addr: a pointer to the allocated address on success * @size: size in bytes of the requested allocation * @max_addr: the allocated memory must be no more than this threshold @@ -212,7 +212,7 @@ static inline EFI_STATUS emalloc_reserved_mem(EFI_PHYSICAL_ADDRESS *addr, /* * emalloc_fixed_addr - it is called to allocate memory hypervisor itself * when CONFIG_RELOC config is NOT enable.And mark the allocated memory as - * EfiReserved memory type so that SOS won't touch it during boot. + * EfiReserved memory type so that Service VM won't touch it during boot. * @addr: a pointer to the allocated address on success * @size: size in bytes of the requested allocation */ diff --git a/misc/hv_prebuild/vm_cfg_checks.c b/misc/hv_prebuild/vm_cfg_checks.c index 66a4274dc..d7c4834f9 100644 --- a/misc/hv_prebuild/vm_cfg_checks.c +++ b/misc/hv_prebuild/vm_cfg_checks.c @@ -108,7 +108,7 @@ bool sanitize_vm_config(void) struct acrn_vm_config *vm_config; /* We need to setup a rule, that the vm_configs[] array should follow - * the order of PRE_LAUNCHED_VM first, and then SOS_VM. + * the order of PRE_LAUNCHED_VM first, and then Service VM. */ for (vm_id = 0U; vm_id < CONFIG_MAX_VM_NUM; vm_id++) { vm_config = get_vm_config(vm_id); @@ -131,14 +131,14 @@ bool sanitize_vm_config(void) } else { #if (SERVICE_VM_NUM == 1U) if (vm_config->severity <= SEVERITY_SERVICE_VM) { - /* If there are both SOS and Pre-launched VM, make sure pre-launched VM has higher severity than SOS */ - printf("%s: pre-launched vm doesn't has higher severity than SOS \n", __func__); + /* If there are both Service VM and Pre-launched VM, make sure pre-launched VM has higher severity than Service VM */ + printf("%s: pre-launched vm doesn't has higher severity than Service VM \n", __func__); ret = false; } #endif } break; - case SOS_VM: + case SERVICE_VM: break; case POST_LAUNCHED_VM: if ((vm_config->severity == (uint8_t)SEVERITY_SAFETY_VM) || (vm_config->severity == (uint8_t)SEVERITY_SERVICE_VM)) { diff --git a/misc/services/acrn_manager/acrn_mngr.h b/misc/services/acrn_manager/acrn_mngr.h index 465e6e7b9..806df5f4d 100644 --- a/misc/services/acrn_manager/acrn_mngr.h +++ b/misc/services/acrn_manager/acrn_mngr.h @@ -108,10 +108,10 @@ enum acrnd_msgid { ACRND_REASON, /* DM ask for updating wakeup reason */ DM_NOTIFY, /* DM notify Acrnd that state is changed */ - /* SOS-LCS ->Acrnd */ - ACRND_STOP, /* SOS-LCS request to Stop all UOS */ - ACRND_RESUME, /* SOS-LCS request to Resume UOS */ - ACRND_SUSPEND, /* SOS-LCS request to Suspend all UOS */ + /* Service-VM-LCS ->Acrnd */ + ACRND_STOP, /* Service-VM-LCS request to Stop all User VM */ + ACRND_RESUME, /* Service-VM-LCS request to Resume User VM */ + ACRND_SUSPEND, /* Service-VM-LCS request to Suspend all User VM */ ACRND_MAX, }; diff --git a/misc/services/acrn_manager/acrnctl.c b/misc/services/acrn_manager/acrnctl.c index 5a0bef6d3..7be74e773 100644 --- a/misc/services/acrn_manager/acrnctl.c +++ b/misc/services/acrn_manager/acrnctl.c @@ -334,7 +334,7 @@ static int acrnctl_do_add(int argc, char *argv[]) /* Properly null-terminate cmd_out */ cmd_out[len - 1] = '\0'; - printf("No executable acrn-dm found: %s, ,please make sure it can launch an UOS\n" + printf("No executable acrn-dm found: %s, ,please make sure it can launch an User VM\n" "result:\n%s\n", argv[1], cmd_out); goto get_vmname; } diff --git a/misc/services/acrn_manager/acrnctl.h b/misc/services/acrn_manager/acrnctl.h index 9f514fd00..360bae626 100644 --- a/misc/services/acrn_manager/acrnctl.h +++ b/misc/services/acrn_manager/acrnctl.h @@ -38,7 +38,7 @@ struct vmmngr_struct { int shell_cmd(const char *cmd, char *outbuf, int len); -/* update names and states of VMs in SOS +/* update names and states of VMs in Service VM * before you stop, start, pause, resume, suspend continue a VM * use a name, it is better to run vmmngr_update() first * and use vmngr_find() to check is this VM is still available diff --git a/misc/services/acrn_manager/acrnd.c b/misc/services/acrn_manager/acrnd.c index ae6e70931..f87cbbf4e 100644 --- a/misc/services/acrn_manager/acrnd.c +++ b/misc/services/acrn_manager/acrnd.c @@ -164,7 +164,7 @@ void acrnd_vm_timer_func(struct work_arg *arg) static pthread_mutex_t timer_file_mutex = PTHREAD_MUTEX_INITIALIZER; -/* load/store_timer_list to file to keep timers if SOS poweroff */ +/* load/store_timer_list to file to keep timers if Service VM poweroff */ static int load_timer_list(void) { FILE *fp; @@ -333,7 +333,7 @@ unsigned get_sos_wakeup_reason(void) req.timestamp = time(NULL); if (mngr_send_msg(client_fd, &req, &ack, SOCK_TIMEOUT) <= 0) - fprintf(stderr, "Failed to get wakeup_reason from SOS, err(%d)\n", ret); + fprintf(stderr, "Failed to get wakeup_reason from Service VM, err(%d)\n", ret); else ret = ack.data.reason; @@ -468,7 +468,7 @@ static int wait_for_stop(unsigned int timeout) { unsigned long t = timeout; - /*Let ospm stopping UOSs */ + /*Let ospm stopping User VMs */ /* list and update the vm status */ do { @@ -600,13 +600,13 @@ void handle_acrnd_resume(struct mngr_msg *msg, int client_fd, void *param) } if (wakeup_reason & CBC_WK_RSN_RTC) { - printf("Resumed UOS, by RTC timer, reason(%x)!\n", wakeup_reason); + printf("Resumed User VM, by RTC timer, reason(%x)!\n", wakeup_reason); /* wakeup by RTC timer */ if (!stat(ACRN_CONF_TIMER_LIST, &st) && S_ISREG(st.st_mode)) { ack.data.err = load_timer_list(); if (ack.data.err == 0) { - printf("Resumed UOS by RTC timer, try do works!\n"); + printf("Resumed User VM by RTC timer, try do works!\n"); /* load timers successfully */ try_do_works(); goto reply_ack; @@ -616,7 +616,7 @@ void handle_acrnd_resume(struct mngr_msg *msg, int client_fd, void *param) perror("Error to load timers, wakeup all VMs"); ack.data.err = wakeup_suspended_vms(wakeup_reason); } else { - printf("Resumed UOS, by ignition button\n"); + printf("Resumed User VM, by ignition button\n"); ack.data.err = wakeup_suspended_vms(wakeup_reason); } @@ -648,7 +648,7 @@ int init_vm(void) sleep(autostart_delay); #endif - /* init all UOSs, according wakeup_reason */ + /* init all User VMs, according wakeup_reason */ if (platform_has_hw_ioc) { wakeup_reason = get_sos_wakeup_reason(); } @@ -664,7 +664,7 @@ int init_vm(void) } } - /* TODO: auto start UOSs */ + /* TODO: auto start User VMs */ printf("Activating all vms\n"); return active_all_vms(); } diff --git a/misc/services/life_mngr/life_mngr.c b/misc/services/life_mngr/life_mngr.c index 036563e5d..32bee996f 100644 --- a/misc/services/life_mngr/life_mngr.c +++ b/misc/services/life_mngr/life_mngr.c @@ -394,13 +394,13 @@ int main(int argc, char *argv[]) { int ret = 0; - char *devname_uos = ""; + char *devname_user_vm = ""; enum process_env env = PROCESS_UNKNOWN; pthread_t sos_socket_pid; /* User VM wait for shutdown from Service VM */ - pthread_t uos_thread_pid_1; + pthread_t user_vm_thread_pid_1; /* User VM wait for shutdown from other process */ - pthread_t uos_thread_pid_2; + pthread_t user_vm_thread_pid_2; log_fd = fopen("/var/log/life_mngr.log", "w+"); if (log_fd == NULL) { @@ -416,10 +416,10 @@ int main(int argc, char *argv[]) if (strncmp("uos", argv[1], NODE_SIZE) == 0) { env = PROCESS_RUN_IN_USER_VM; - devname_uos = argv[2]; - tty_dev_fd = open(devname_uos, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK); + devname_user_vm = argv[2]; + tty_dev_fd = open(devname_user_vm, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK); if (tty_dev_fd < 0) { - LOG_PRINTF("Error opening %s: %s\n", devname_uos, strerror(errno)); + LOG_PRINTF("Error opening %s: %s\n", devname_user_vm, strerror(errno)); fclose(log_fd); return errno; } @@ -427,8 +427,8 @@ int main(int argc, char *argv[]) return -EINVAL; } - ret = pthread_create(&uos_thread_pid_1, NULL, listener_fn_to_sos, NULL); - ret = pthread_create(&uos_thread_pid_2, NULL, listener_fn_to_operator, NULL); + ret = pthread_create(&user_vm_thread_pid_1, NULL, listener_fn_to_sos, NULL); + ret = pthread_create(&user_vm_thread_pid_2, NULL, listener_fn_to_operator, NULL); } else if (strncmp("sos", argv[1], NODE_SIZE) == 0) { env = PROCESS_RUN_IN_SERVICE_VM; @@ -442,8 +442,8 @@ int main(int argc, char *argv[]) if (env == PROCESS_RUN_IN_SERVICE_VM) { pthread_join(sos_socket_pid, NULL); } else if (env == PROCESS_RUN_IN_USER_VM) { - pthread_join(uos_thread_pid_1, NULL); - pthread_join(uos_thread_pid_2, NULL); + pthread_join(user_vm_thread_pid_1, NULL); + pthread_join(user_vm_thread_pid_2, NULL); close(tty_dev_fd); } fclose(log_fd); diff --git a/misc/services/life_mngr/life_mngr_win.c b/misc/services/life_mngr/life_mngr_win.c index 9ebda6508..c70f69643 100644 --- a/misc/services/life_mngr/life_mngr_win.c +++ b/misc/services/life_mngr/life_mngr_win.c @@ -8,7 +8,7 @@ #define SERVICE_VM_REQ "shutdown" -#define UOS_ACK "acked" +#define USER_VM_ACK "acked" #define BUFF_SIZE 16U #define MSG_SIZE 8U @@ -71,7 +71,7 @@ int main() if (strncmp(recvbuf, SERVICE_VM_REQ, MSG_SIZE) == 0) { - WriteFile(hCom, UOS_ACK, sizeof(UOS_ACK), NULL, NULL); + WriteFile(hCom, USER_VM_ACK, sizeof(USER_VM_ACK), NULL, NULL); system("shutdown -s -t 0"); break; }