mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: Add prefix 'p' before 'cpu' to physical cpu related functions
This patch adds prefix 'p' before 'cpu' to physical cpu related functions. And there is no code logic change. Tracked-On: #2991 Signed-off-by: Kaige Fu <kaige.fu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -256,12 +256,12 @@ enum pcpu_boot_state {
|
||||
void cpu_do_idle(void);
|
||||
void cpu_dead(void);
|
||||
void trampoline_start16(void);
|
||||
void load_cpu_state_data(void);
|
||||
void init_cpu_pre(uint16_t pcpu_id_args);
|
||||
void init_cpu_post(uint16_t pcpu_id);
|
||||
bool start_cpus(uint64_t mask);
|
||||
void load_pcpu_state_data(void);
|
||||
void init_pcpu_pre(uint16_t pcpu_id_args);
|
||||
void init_pcpu_post(uint16_t pcpu_id);
|
||||
bool start_pcpus(uint64_t mask);
|
||||
void wait_pcpus_offline(uint64_t mask);
|
||||
void stop_cpus(void);
|
||||
void stop_pcpus(void);
|
||||
void wait_sync_change(uint64_t *sync, uint64_t wake_sync);
|
||||
|
||||
#define CPU_SEG_READ(seg, result_ptr) \
|
||||
@@ -412,7 +412,7 @@ cpu_rdtscp_execute(uint64_t *timestamp_ptr, uint32_t *cpu_id_ptr)
|
||||
* Macro to get CPU ID
|
||||
* @pre: the return CPU ID would never equal or large than phys_cpu_num.
|
||||
*/
|
||||
static inline uint16_t get_cpu_id(void)
|
||||
static inline uint16_t get_pcpu_id(void)
|
||||
{
|
||||
uint32_t tsl, tsh, cpu_id;
|
||||
|
||||
|
@@ -38,12 +38,12 @@ struct cpuinfo_x86 {
|
||||
|
||||
bool has_monitor_cap(void);
|
||||
bool is_apicv_advanced_feature_supported(void);
|
||||
bool cpu_has_cap(uint32_t bit);
|
||||
bool cpu_has_vmx_ept_cap(uint32_t bit_mask);
|
||||
bool cpu_has_vmx_vpid_cap(uint32_t bit_mask);
|
||||
void init_cpu_capabilities(void);
|
||||
void init_cpu_model_name(void);
|
||||
bool pcpu_has_cap(uint32_t bit);
|
||||
bool pcpu_has_vmx_ept_cap(uint32_t bit_mask);
|
||||
bool pcpu_has_vmx_vpid_cap(uint32_t bit_mask);
|
||||
void init_pcpu_capabilities(void);
|
||||
void init_pcpu_model_name(void);
|
||||
int32_t detect_hardware_support(void);
|
||||
struct cpuinfo_x86 *get_cpu_info(void);
|
||||
struct cpuinfo_x86 *get_pcpu_info(void);
|
||||
|
||||
#endif /* CPUINFO_H */
|
||||
|
@@ -9,7 +9,7 @@
|
||||
/* hypervisor stack bottom magic('intl') */
|
||||
#define SP_BOTTOM_MAGIC 0x696e746cUL
|
||||
|
||||
void init_primary_cpu(void);
|
||||
void init_secondary_cpu(void);
|
||||
void init_primary_pcpu(void);
|
||||
void init_secondary_pcpu(void);
|
||||
|
||||
#endif /* INIT_H*/
|
||||
|
@@ -52,7 +52,7 @@
|
||||
#define CACHE_LINE_SIZE 64U
|
||||
|
||||
/* IA32E Paging constants */
|
||||
#define IA32E_REF_MASK ((get_cpu_info())->physical_address_mask)
|
||||
#define IA32E_REF_MASK ((get_pcpu_info())->physical_address_mask)
|
||||
|
||||
struct acrn_vcpu;
|
||||
static inline uint64_t round_page_up(uint64_t addr)
|
||||
|
@@ -62,6 +62,6 @@ extern struct per_cpu_region per_cpu_data[CONFIG_MAX_PCPU_NUM];
|
||||
(per_cpu_data[(pcpu_id)].name)
|
||||
|
||||
/* get percpu data for current pcpu */
|
||||
#define get_cpu_var(name) per_cpu(name, get_cpu_id())
|
||||
#define get_cpu_var(name) per_cpu(name, get_pcpu_id())
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user