Skip to content

Commit 6071234

Browse files
jsun26intelacrnsi
authored andcommitted
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>
1 parent 4557033 commit 6071234

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

devicemodel/core/vmmapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ vm_create(const char *name, uint64_t req_buf)
126126
uuid_copy(ctx->vm_uuid, vm_uuid);
127127

128128
/* Pass uuid as parameter of create vm*/
129-
uuid_copy(create_vm.GUID, vm_uuid);
129+
uuid_copy(create_vm.uuid, vm_uuid);
130130

131131
ctx->fd = devfd;
132132
ctx->lowmem_limit = 2 * GB;

hypervisor/arch/x86/guest/trusty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static bool setup_trusty_info(struct acrn_vcpu *vcpu, uint32_t mem_size, uint64_
331331
/* Derive dvseed from dseed for Trusty */
332332
if (derive_virtual_seed(&key_info.dseed_list[0U], &key_info.num_seeds,
333333
NULL, 0U,
334-
vcpu->vm->GUID, sizeof(vcpu->vm->GUID))) {
334+
vcpu->vm->uuid, sizeof(vcpu->vm->uuid))) {
335335
/* Derive encryption key of attestation keybox from dseed */
336336
if (derive_attkb_enc_key(key_info.attkb_enc_key)) {
337337
/* Prepare trusty startup param */

hypervisor/arch/x86/guest/vm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
392392
snprintf(vm_config->name, 16, "ACRN VM_%d", vm_id);
393393
}
394394

395-
(void)memcpy_s(&vm->GUID[0], sizeof(vm->GUID),
396-
&vm_config->GUID[0], sizeof(vm_config->GUID));
395+
(void)memcpy_s(&vm->uuid[0], sizeof(vm->uuid),
396+
&vm_config->uuid[0], sizeof(vm_config->uuid));
397397

398398
if (vm_config->type == PRE_LAUNCHED_VM) {
399399
create_prelaunched_vm_e820(vm);

hypervisor/common/hypercall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ int32_t hcall_create_vm(struct acrn_vm *vm, uint64_t param)
134134
/* TODO: set by DM */
135135
vm_config->type = NORMAL_VM;
136136
vm_config->guest_flags |= cv.vm_flag;
137-
(void)memcpy_s(&vm_config->GUID[0], 16U, &cv.GUID[0], 16U);
137+
(void)memcpy_s(&vm_config->uuid[0], 16U, &cv.uuid[0], 16U);
138138

139139
/* GUEST_FLAG_RT must be set if we have GUEST_FLAG_LAPIC_PASSTHROUGH set in guest_flags */
140140
if (((vm_config->guest_flags & GUEST_FLAG_LAPIC_PASSTHROUGH) != 0U)

hypervisor/debug/profiling.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,8 @@ int32_t profiling_vm_list_info(struct acrn_vm *vm, uint64_t addr)
888888
vm_idx++;
889889

890890
vm_info_list.vm_list[vm_idx].vm_id_num = tmp_vm->vm_id;
891-
(void)memcpy_s((void *)vm_info_list.vm_list[vm_idx].guid,
892-
16U, tmp_vm->GUID, 16U);
891+
(void)memcpy_s((void *)vm_info_list.vm_list[vm_idx].uuid,
892+
16U, tmp_vm->uuid, 16U);
893893
snprintf(vm_info_list.vm_list[vm_idx].vm_name, 16U, "vm_%d",
894894
tmp_vm->vm_id, 16U);
895895
vm_info_list.vm_list[vm_idx].num_vcpus = 0;

hypervisor/include/arch/x86/guest/vm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct acrn_vm {
137137
io_read_fn_t default_io_read;
138138
io_write_fn_t default_io_write;
139139

140-
uint8_t GUID[16];
140+
uint8_t uuid[16];
141141
struct secure_world_control sworld_control;
142142

143143
/* Secure World's snapshot

hypervisor/include/arch/x86/vm_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct acrn_vm_pci_ptdev_config {
4545
struct acrn_vm_config {
4646
enum acrn_vm_type type; /* specify the type of VM */
4747
char name[MAX_VM_OS_NAME_LEN]; /* VM name identifier, useful for debug. */
48-
uint8_t GUID[16]; /* GUID of the VM */
48+
uint8_t uuid[16]; /* UUID of the VM */
4949
uint64_t pcpu_bitmap; /* from pcpu bitmap, we could know VM core number */
5050
uint64_t guest_flags; /* VM flags that we want to configure for guest
5151
* Now we have two flags:

hypervisor/include/debug/profiling_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct profiling_vcpu_pcpu_map {
111111

112112
struct profiling_vm_info {
113113
uint16_t vm_id_num;
114-
uint8_t guid[16];
114+
uint8_t uuid[16];
115115
char vm_name[16];
116116
uint16_t num_vcpus;
117117
struct profiling_vcpu_pcpu_map cpu_map[CONFIG_MAX_VCPUS_PER_VM];

hypervisor/include/public/acrn_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ struct acrn_create_vm {
351351
/** Reserved */
352352
uint16_t reserved1;
353353

354-
/** the GUID of this VM */
355-
uint8_t GUID[16];
354+
/** the UUID of this VM */
355+
uint8_t uuid[16];
356356

357357
/* VM flag bits from Guest OS, now used
358358
* GUEST_FLAG_SECURE_WORLD_ENABLED (1UL<<0)

0 commit comments

Comments
 (0)