HV: use term of UUID

The code mixed the usage on term of UUID and GUID, now use UUID to make
code more consistent, also will use lowercase (i.e. uuid) in variable name
definition.

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:
Victor Sun 2019-04-12 10:16:57 +08:00 committed by ACRN System Integration
parent 4557033a3a
commit 6071234337
9 changed files with 12 additions and 12 deletions

View File

@ -126,7 +126,7 @@ vm_create(const char *name, uint64_t req_buf)
uuid_copy(ctx->vm_uuid, vm_uuid);
/* Pass uuid as parameter of create vm*/
uuid_copy(create_vm.GUID, vm_uuid);
uuid_copy(create_vm.uuid, vm_uuid);
ctx->fd = devfd;
ctx->lowmem_limit = 2 * GB;

View File

@ -331,7 +331,7 @@ static bool setup_trusty_info(struct acrn_vcpu *vcpu, uint32_t mem_size, uint64_
/* Derive dvseed from dseed for Trusty */
if (derive_virtual_seed(&key_info.dseed_list[0U], &key_info.num_seeds,
NULL, 0U,
vcpu->vm->GUID, sizeof(vcpu->vm->GUID))) {
vcpu->vm->uuid, sizeof(vcpu->vm->uuid))) {
/* Derive encryption key of attestation keybox from dseed */
if (derive_attkb_enc_key(key_info.attkb_enc_key)) {
/* Prepare trusty startup param */

View File

@ -392,8 +392,8 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
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));
(void)memcpy_s(&vm->uuid[0], sizeof(vm->uuid),
&vm_config->uuid[0], sizeof(vm_config->uuid));
if (vm_config->type == PRE_LAUNCHED_VM) {
create_prelaunched_vm_e820(vm);

View File

@ -134,7 +134,7 @@ int32_t hcall_create_vm(struct acrn_vm *vm, uint64_t param)
/* TODO: set by DM */
vm_config->type = NORMAL_VM;
vm_config->guest_flags |= cv.vm_flag;
(void)memcpy_s(&vm_config->GUID[0], 16U, &cv.GUID[0], 16U);
(void)memcpy_s(&vm_config->uuid[0], 16U, &cv.uuid[0], 16U);
/* GUEST_FLAG_RT must be set if we have GUEST_FLAG_LAPIC_PASSTHROUGH set in guest_flags */
if (((vm_config->guest_flags & GUEST_FLAG_LAPIC_PASSTHROUGH) != 0U)

View File

@ -888,8 +888,8 @@ int32_t profiling_vm_list_info(struct acrn_vm *vm, uint64_t addr)
vm_idx++;
vm_info_list.vm_list[vm_idx].vm_id_num = tmp_vm->vm_id;
(void)memcpy_s((void *)vm_info_list.vm_list[vm_idx].guid,
16U, tmp_vm->GUID, 16U);
(void)memcpy_s((void *)vm_info_list.vm_list[vm_idx].uuid,
16U, tmp_vm->uuid, 16U);
snprintf(vm_info_list.vm_list[vm_idx].vm_name, 16U, "vm_%d",
tmp_vm->vm_id, 16U);
vm_info_list.vm_list[vm_idx].num_vcpus = 0;

View File

@ -137,7 +137,7 @@ struct acrn_vm {
io_read_fn_t default_io_read;
io_write_fn_t default_io_write;
uint8_t GUID[16];
uint8_t uuid[16];
struct secure_world_control sworld_control;
/* Secure World's snapshot

View File

@ -45,7 +45,7 @@ struct acrn_vm_pci_ptdev_config {
struct acrn_vm_config {
enum acrn_vm_type type; /* specify the type of VM */
char name[MAX_VM_OS_NAME_LEN]; /* VM name identifier, useful for debug. */
uint8_t GUID[16]; /* GUID of the VM */
uint8_t uuid[16]; /* UUID of the VM */
uint64_t pcpu_bitmap; /* from pcpu bitmap, we could know VM core number */
uint64_t guest_flags; /* VM flags that we want to configure for guest
* Now we have two flags:

View File

@ -111,7 +111,7 @@ struct profiling_vcpu_pcpu_map {
struct profiling_vm_info {
uint16_t vm_id_num;
uint8_t guid[16];
uint8_t uuid[16];
char vm_name[16];
uint16_t num_vcpus;
struct profiling_vcpu_pcpu_map cpu_map[CONFIG_MAX_VCPUS_PER_VM];

View File

@ -351,8 +351,8 @@ struct acrn_create_vm {
/** Reserved */
uint16_t reserved1;
/** the GUID of this VM */
uint8_t GUID[16];
/** the UUID of this VM */
uint8_t uuid[16];
/* VM flag bits from Guest OS, now used
* GUEST_FLAG_SECURE_WORLD_ENABLED (1UL<<0)