diff options
author | Avi Kivity <avi@qumranet.com> | 2006-12-13 03:34:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:48 -0500 |
commit | 873a7c423bf8f12bff48a4b8963b32be568b4fcf (patch) | |
tree | 947beeefe93c4b90807d188ec15271218673a3f5 | |
parent | 802ba064c49f655d20fed563f2a4924c8256ea10 (diff) |
[PATCH] KVM: Disallow the kvm-amd module on intel hardware, and vice versa
They're not on speaking terms.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/kvm/svm.c | 5 | ||||
-rw-r--r-- | drivers/kvm/vmx.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 73a022c1f7b6..0e6bc8c649ce 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -377,6 +377,7 @@ static __init int svm_hardware_setup(void) | |||
377 | void *msrpm_va; | 377 | void *msrpm_va; |
378 | int r; | 378 | int r; |
379 | 379 | ||
380 | kvm_emulator_want_group7_invlpg(); | ||
380 | 381 | ||
381 | iopm_pages = alloc_pages(GFP_KERNEL, IOPM_ALLOC_ORDER); | 382 | iopm_pages = alloc_pages(GFP_KERNEL, IOPM_ALLOC_ORDER); |
382 | 383 | ||
@@ -1628,9 +1629,7 @@ static struct kvm_arch_ops svm_arch_ops = { | |||
1628 | 1629 | ||
1629 | static int __init svm_init(void) | 1630 | static int __init svm_init(void) |
1630 | { | 1631 | { |
1631 | kvm_emulator_want_group7_invlpg(); | 1632 | return kvm_init_arch(&svm_arch_ops, THIS_MODULE); |
1632 | kvm_init_arch(&svm_arch_ops, THIS_MODULE); | ||
1633 | return 0; | ||
1634 | } | 1633 | } |
1635 | 1634 | ||
1636 | static void __exit svm_exit(void) | 1635 | static void __exit svm_exit(void) |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 43622061660b..d046296a9304 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -2000,8 +2000,7 @@ static struct kvm_arch_ops vmx_arch_ops = { | |||
2000 | 2000 | ||
2001 | static int __init vmx_init(void) | 2001 | static int __init vmx_init(void) |
2002 | { | 2002 | { |
2003 | kvm_init_arch(&vmx_arch_ops, THIS_MODULE); | 2003 | return kvm_init_arch(&vmx_arch_ops, THIS_MODULE); |
2004 | return 0; | ||
2005 | } | 2004 | } |
2006 | 2005 | ||
2007 | static void __exit vmx_exit(void) | 2006 | static void __exit vmx_exit(void) |