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

@@ -123,7 +123,7 @@ static const struct vm_exit_dispatch dispatch_table[] = {
[VMX_EXIT_REASON_ENTRY_FAILURE_MACHINE_CHECK] = {
.handler = unhandled_vmexit_handler},
[VMX_EXIT_REASON_TPR_BELOW_THRESHOLD] = {
.handler = unhandled_vmexit_handler},
.handler = apic_tpr_below_threshold_exit_handler},
[VMX_EXIT_REASON_APIC_ACCESS] = {
.handler = apic_access_exit_handler,
.need_exit_qualification = 1},