hv:enable APICv features based on CPU capability

this patch is to detect and enable only APICv features which
are actually supported by the processor, instead fo tuning on
all features by default.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang
2018-03-22 01:17:24 +08:00
committed by Jack Ren
parent f01a8eef58
commit 7d8803f5ea
7 changed files with 123 additions and 62 deletions

View File

@@ -225,7 +225,9 @@ int hv_main(int cpu_id);
bool check_tsc_adjust_support(void);
bool check_ibrs_ibpb_support(void);
bool check_stibp_support(void);
bool is_apicv_enabled(void);
bool is_vapic_supported(void);
bool is_vapic_intr_delivery_supported(void);
bool is_vapic_virt_reg_supported(void);
/* Read control register */
#define CPU_CR_READ(cr, result_ptr) \