Skip to content

Commit

Permalink
[PATCH] KVM: Fix vmx hardware_enable() on macbooks
Browse files Browse the repository at this point in the history
It seems macbooks set bit 2 but not bit 0, which is an "enabled but vmxon will
fault" setting.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Tested-by: Alex Larsson (sometimes testing helps)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Dec 13, 2006
1 parent 3b99ab2 commit bfdc0c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static __init void hardware_enable(void *garbage)
u64 old;

rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
if ((old & 5) == 0)
if ((old & 5) != 5)
/* enable and lock */
wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5);
write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */
Expand Down

0 comments on commit bfdc0c2

Please sign in to comment.