mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-16 14:28:56 +00:00
HV: make vm id statically by uuid
Currently VM id of NORMAL_VM is allocated dymatically, we need to make VM id statically for FuSa compliance. This patch will pre-configure UUID for all VMs, then NORMAL_VM could get its VM id/configuration from vm_configs array by indexing the UUID. If UUID collisions is found in vm configs array, HV will refuse to load the VM; 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:
committed by
ACRN System Integration
parent
cb10dc7e73
commit
445999af5d
@@ -15,6 +15,9 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
{ /* VM0 */
|
||||
.type = PRE_LAUNCHED_VM,
|
||||
.name = "ACRN PRE-LAUNCHED VM0",
|
||||
.uuid = {0x26U, 0xc5U, 0xe0U, 0xd8U, 0x8fU, 0x8aU, 0x47U, 0xd8U, \
|
||||
0x81U, 0x09U, 0xf2U, 0x01U, 0xebU, 0xd6U, 0x1aU, 0x5eU},
|
||||
/* 26c5e0d8-8f8a-47d8-8109-f201ebd61a5e */
|
||||
.pcpu_bitmap = VM0_CONFIG_PCPU_BITMAP,
|
||||
.guest_flags = GUEST_FLAG_IO_COMPLETION_POLLING,
|
||||
.clos = 0U,
|
||||
@@ -38,6 +41,9 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
{ /* VM1 */
|
||||
.type = PRE_LAUNCHED_VM,
|
||||
.name = "ACRN PRE-LAUNCHED VM1",
|
||||
.uuid = {0xddU, 0x87U, 0xceU, 0x08U, 0x66U, 0xf9U, 0x47U, 0x3dU, \
|
||||
0xbcU, 0x58U, 0x76U, 0x05U, 0x83U, 0x7fU, 0x93U, 0x5eU},
|
||||
/* dd87ce08-66f9-473d-bc58-7605837f935e */
|
||||
.pcpu_bitmap = VM1_CONFIG_PCPU_BITMAP,
|
||||
.guest_flags = GUEST_FLAG_IO_COMPLETION_POLLING,
|
||||
.clos = 0U,
|
||||
|
@@ -12,6 +12,9 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
{
|
||||
.type = SOS_VM,
|
||||
.name = "ACRN SOS VM",
|
||||
.uuid = {0xdbU, 0xbbU, 0xd4U, 0x34U, 0x7aU, 0x57U, 0x42U, 0x16U, \
|
||||
0xa1U, 0x2cU, 0x22U, 0x01U, 0xf1U, 0xabU, 0x02U, 0x40U},
|
||||
/* dbbbd434-7a57-4216-a12c-2201f1ab0240 */
|
||||
.guest_flags = GUEST_FLAG_IO_COMPLETION_POLLING,
|
||||
.clos = 0U,
|
||||
.memory = {
|
||||
@@ -22,4 +25,10 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
.name = "ACRN Service OS",
|
||||
},
|
||||
},
|
||||
{
|
||||
.type = NORMAL_VM,
|
||||
.uuid = {0xd2U, 0x79U, 0x54U, 0x38U, 0x25U, 0xd6U, 0x11U, 0xe8U, \
|
||||
0x86U, 0x4eU, 0xcbU, 0x7aU, 0x18U, 0xb3U, 0x46U, 0x43U},
|
||||
/* d2795438-25d6-11e8-864e-cb7a18b34643 */
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user