Skip to content

Commit e3302e8

Browse files
Shawnshhlijinxia
authored andcommitted
HV:transfer vm_hw_logical_core_ids's type and rename it
rename vm_hw_logical_core_ids to vm_pcpu_ids and changed the type to uint16_t. V1->V2:rename the vm_hw_logical_core_ids Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 1d628c6 commit e3302e8

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

hypervisor/arch/x86/guest/vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static inline bool vcpu_in_vm_desc(struct vcpu *vcpu,
356356
int i;
357357

358358
for (i = 0; i < vm_desc->vm_hw_num_cores; i++) {
359-
if (vcpu->pcpu_id == vm_desc->vm_hw_logical_core_ids[i]) {
359+
if (vcpu->pcpu_id == vm_desc->vm_pcpu_ids[i]) {
360360
return true;
361361
}
362362
}

hypervisor/bsp/sbl/vm_description.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#define VM0_NUM_CPUS 1
1111

1212
/* Logical CPU IDs assigned to VM0 */
13-
int VM0_CPUS[VM0_NUM_CPUS] = {0};
13+
uint16_t VM0_CPUS[VM0_NUM_CPUS] = {0U};
1414

1515
struct vm_description vm0_desc = {
1616
.vm_hw_num_cores = VM0_NUM_CPUS,
17-
.vm_hw_logical_core_ids = &VM0_CPUS[0],
17+
.vm_pcpu_ids = &VM0_CPUS[0],
1818
};

hypervisor/bsp/uefi/vm_description.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#define VM0_NUM_CPUS 1
1111

1212
/* Logical CPU IDs assigned to VM0 */
13-
int VM0_CPUS[VM0_NUM_CPUS] = {0};
13+
uint16_t VM0_CPUS[VM0_NUM_CPUS] = {0U};
1414

1515
struct vm_description vm0_desc = {
1616
.vm_hw_num_cores = VM0_NUM_CPUS,
17-
.vm_hw_logical_core_ids = &VM0_CPUS[0],
17+
.vm_pcpu_ids = &VM0_CPUS[0],
1818
};

hypervisor/common/hv_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void vcpu_thread(struct vcpu *vcpu)
104104

105105
static bool is_vm0_bsp(uint16_t pcpu_id)
106106
{
107-
return pcpu_id == vm0_desc.vm_hw_logical_core_ids[0];
107+
return pcpu_id == vm0_desc.vm_pcpu_ids[0];
108108
}
109109

110110
int32_t hv_main(uint16_t pcpu_id)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ struct vm {
158158
};
159159

160160
struct vm_description {
161-
/* The logical CPU IDs associated with this VM - The first CPU listed
161+
/* The physical CPU IDs associated with this VM - The first CPU listed
162162
* will be the VM's BSP
163163
*/
164-
int *vm_hw_logical_core_ids;
164+
uint16_t *vm_pcpu_ids;
165165
unsigned char GUID[16]; /* GUID of the vm will be created */
166166
uint16_t vm_hw_num_cores; /* Number of virtual cores */
167167
/* Whether secure world is enabled for current VM. */

0 commit comments

Comments
 (0)