diff options
author | Avi Kivity <avi@qumranet.com> | 2006-12-13 03:34:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:48 -0500 |
commit | bfdc0c280a497575670e87efa89e78a88438483b (patch) | |
tree | 6c7a3ee533f9f163393e61efa3e57e3e72bddf82 /drivers/kvm | |
parent | 3b99ab242145c99ec8781dc267ec100e7f23ef9d (diff) |
[PATCH] KVM: Fix vmx hardware_enable() on macbooks
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>
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ea3bdbb0da9c..f0f0b1a781f8 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -534,7 +534,7 @@ static __init void hardware_enable(void *garbage) | |||
534 | u64 old; | 534 | u64 old; |
535 | 535 | ||
536 | rdmsrl(MSR_IA32_FEATURE_CONTROL, old); | 536 | rdmsrl(MSR_IA32_FEATURE_CONTROL, old); |
537 | if ((old & 5) == 0) | 537 | if ((old & 5) != 5) |
538 | /* enable and lock */ | 538 | /* enable and lock */ |
539 | wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5); | 539 | wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5); |
540 | write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */ | 540 | write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */ |