mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
HV: show correct vm name per config
The patch will show correct VM name per its configuration. As we do not validate vm id when call get_vm_from_vmid() any more, we only show VM's states which their VM type are defined; If VM name is not configured in config file, then the name is specified with vm id, i.e. "ACRN VM_(vm id)" Tracked-On: #2291 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -141,6 +141,10 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
|
||||
hva2hpa(ept_mem_ops->get_sworld_memory_base(ept_mem_ops->info)),
|
||||
TRUSTY_EPT_REBASE_GPA, TRUSTY_RAM_SIZE, EPT_WB | EPT_RWX);
|
||||
}
|
||||
if (vm_config->name[0] == '\0') {
|
||||
/* if VM name is not configured, specify with VM ID */
|
||||
snprintf(vm_config->name, 16, "ACRN VM_%d", vm_id);
|
||||
}
|
||||
|
||||
(void)memcpy_s(&vm->GUID[0], sizeof(vm->GUID),
|
||||
&vm_config->GUID[0], sizeof(vm_config->GUID));
|
||||
@@ -411,7 +415,7 @@ void prepare_vm(uint16_t vm_id, struct acrn_vm_config *vm_config)
|
||||
/* start vm BSP automatically */
|
||||
start_vm(vm);
|
||||
|
||||
pr_acrnlog("Start VM%x", vm->vm_id);
|
||||
pr_acrnlog("Start VM id: %x name: %s", vm_id, vm_config->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user