summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-12-26 13:57:04 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-30 18:01:20 +0200
commit774ead3ad9bcbc05ef6aaebb9bdf8b4c3126923b (patch)
tree0395ee65292f99bd43ab2cd07beb554d99cb096f /arch/x86/kvm/vmx.c
parentb93463aa59d67b21b4921e30bd5c5dcc7c35ffbd (diff)
KVM: Disable vapic support on Intel machines with FlexPriority
FlexPriority accelerates the tpr without any patching. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index fc494aff5d8b..d1167fc303d6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -192,7 +192,7 @@ static inline int cpu_has_secondary_exec_ctrls(void)
CPU_BASED_ACTIVATE_SECONDARY_CONTROLS);
}
-static inline int cpu_has_vmx_virtualize_apic_accesses(void)
+static inline bool cpu_has_vmx_virtualize_apic_accesses(void)
{
return (vmcs_config.cpu_based_2nd_exec_ctrl &
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES);
@@ -2565,6 +2565,7 @@ static struct kvm_x86_ops vmx_x86_ops = {
.check_processor_compatibility = vmx_check_processor_compat,
.hardware_enable = hardware_enable,
.hardware_disable = hardware_disable,
+ .cpu_has_accelerated_tpr = cpu_has_vmx_virtualize_apic_accesses,
.vcpu_create = vmx_create_vcpu,
.vcpu_free = vmx_free_vcpu,