Skip to content

Commit

Permalink
KVM: VMX: Add module option to disable flexpriority
Browse files Browse the repository at this point in the history
Useful for debugging.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Apr 27, 2008
1 parent 268fe02 commit 4c9fc8e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ module_param(bypass_guest_pf, bool, 0);
static int enable_vpid = 1;
module_param(enable_vpid, bool, 0);

static int flexpriority_enabled = 1;
module_param(flexpriority_enabled, bool, 0);

struct vmcs {
u32 revision_id;
u32 abort;
Expand Down Expand Up @@ -200,8 +203,9 @@ static inline int cpu_has_secondary_exec_ctrls(void)

static inline bool cpu_has_vmx_virtualize_apic_accesses(void)
{
return (vmcs_config.cpu_based_2nd_exec_ctrl &
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES);
return flexpriority_enabled
&& (vmcs_config.cpu_based_2nd_exec_ctrl &
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES);
}

static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm)
Expand Down

0 comments on commit 4c9fc8e

Please sign in to comment.