hv: rename BOOT_CPU_ID to BSP_CPU_ID

1. Rename BOOT_CPU_ID to BSP_CPU_ID
  2. Repace hardcoded value with BSP_CPU_ID when
  ID of BSP is referenced.

Tracked-On: #4420
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang
2020-02-21 11:29:57 +08:00
committed by wenlingz
parent 4adad73cfc
commit 64b874ce4c
18 changed files with 34 additions and 33 deletions

View File

@@ -145,8 +145,6 @@
#define CPU_MHZ_TO_HZ 1000000
#define CPU_MHZ_TO_KHZ 1000
/* Boot CPU ID */
#define BOOT_CPU_ID 0U
/* Number of GPRs saved / restored for guest in VCPU structure */
#define NUM_GPRS 16U
@@ -276,6 +274,9 @@ extern uint64_t secondary_cpu_stack[1];
* to locate the per cpu data.
*/
/* Boot CPU ID */
#define BSP_CPU_ID 0U
/**
*The invalid cpu_id (INVALID_CPU_ID) is error
*code for error handling, this means that

View File

@@ -283,7 +283,7 @@ struct guest_mem_dump {
static inline bool is_vcpu_bsp(const struct acrn_vcpu *vcpu)
{
return (vcpu->vcpu_id == BOOT_CPU_ID);
return (vcpu->vcpu_id == BSP_CPU_ID);
}
static inline enum vm_cpu_mode get_vcpu_mode(const struct acrn_vcpu *vcpu)