public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: Some more fixes
@ 2006-12-12 13:55 Avi Kivity
  2006-12-12 13:57 ` [PATCH 1/3] KVM: Disallow the kvm-amd module on intel hardware, and vice versa Avi Kivity
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Avi Kivity @ 2006-12-12 13:55 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, Andrew Morton, Ingo Molnar

This patchset prevents people from shooting themselves in the foot by 
loading the wrong module, allows macbook owners to shoot their feet by 
making the module work, and removes some random error messages on 32-bit 
hosts.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] KVM: Disallow the kvm-amd module on intel hardware, and vice versa
  2006-12-12 13:55 [PATCH 0/3] KVM: Some more fixes Avi Kivity
@ 2006-12-12 13:57 ` Avi Kivity
  2006-12-12 13:58 ` [PATCH 2/3] KVM: Don't touch the virtual apic vt registers on 32-bit Avi Kivity
  2006-12-12 13:59 ` [PATCH 3/3] KVM: Fix vmx hardware_enable() on macbooks Avi Kivity
  2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2006-12-12 13:57 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, akpm, mingo

They're not on speaking terms.

Signed-off-by: Avi Kivity <avi@qumranet.com>

Index: linux-2.6/drivers/kvm/svm.c
===================================================================
--- linux-2.6.orig/drivers/kvm/svm.c
+++ linux-2.6/drivers/kvm/svm.c
@@ -377,6 +377,7 @@ static __init int svm_hardware_setup(voi
 	void *msrpm_va;
 	int r;
 
+	kvm_emulator_want_group7_invlpg();
 
 	iopm_pages = alloc_pages(GFP_KERNEL, IOPM_ALLOC_ORDER);
 
@@ -1628,9 +1629,7 @@ static struct kvm_arch_ops svm_arch_ops 
 
 static int __init svm_init(void)
 {
-	kvm_emulator_want_group7_invlpg();
-	kvm_init_arch(&svm_arch_ops, THIS_MODULE);
-	return 0;
+	return kvm_init_arch(&svm_arch_ops, THIS_MODULE);
 }
 
 static void __exit svm_exit(void)
Index: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -2000,8 +2000,7 @@ static struct kvm_arch_ops vmx_arch_ops 
 
 static int __init vmx_init(void)
 {
-	kvm_init_arch(&vmx_arch_ops, THIS_MODULE);
-	return 0;
+	return kvm_init_arch(&vmx_arch_ops, THIS_MODULE);
 }
 
 static void __exit vmx_exit(void)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] KVM: Don't touch the virtual apic vt registers on 32-bit
  2006-12-12 13:55 [PATCH 0/3] KVM: Some more fixes Avi Kivity
  2006-12-12 13:57 ` [PATCH 1/3] KVM: Disallow the kvm-amd module on intel hardware, and vice versa Avi Kivity
@ 2006-12-12 13:58 ` Avi Kivity
  2006-12-12 13:59 ` [PATCH 3/3] KVM: Fix vmx hardware_enable() on macbooks Avi Kivity
  2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2006-12-12 13:58 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, akpm, mingo

From: Michael Riepe <michael@mr511.de>

Signed-off-by: Avi Kivity <avi@qumranet.com>

Index: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -1175,8 +1175,10 @@ static int vmx_vcpu_setup(struct kvm_vcp
                                VM_ENTRY_CONTROLS, 0);
 	vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, 0);  /* 22.2.1 */
 
+#ifdef CONFIG_X86_64
 	vmcs_writel(VIRTUAL_APIC_PAGE_ADDR, 0);
 	vmcs_writel(TPR_THRESHOLD, 0);
+#endif
 
 	vmcs_writel(CR0_GUEST_HOST_MASK, KVM_GUEST_CR0_MASK);
 	vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] KVM: Fix vmx hardware_enable() on macbooks
  2006-12-12 13:55 [PATCH 0/3] KVM: Some more fixes Avi Kivity
  2006-12-12 13:57 ` [PATCH 1/3] KVM: Disallow the kvm-amd module on intel hardware, and vice versa Avi Kivity
  2006-12-12 13:58 ` [PATCH 2/3] KVM: Don't touch the virtual apic vt registers on 32-bit Avi Kivity
@ 2006-12-12 13:59 ` Avi Kivity
  2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2006-12-12 13:59 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, akpm, mingo

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>

Index: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -534,7 +534,7 @@ static __init void hardware_enable(void 
 	u64 old;
 
 	rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
-	if ((old & 5) == 0)
+	if ((old & 4) == 0)
 		/* enable and lock */
 		wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5);
 	write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-12 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 13:55 [PATCH 0/3] KVM: Some more fixes Avi Kivity
2006-12-12 13:57 ` [PATCH 1/3] KVM: Disallow the kvm-amd module on intel hardware, and vice versa Avi Kivity
2006-12-12 13:58 ` [PATCH 2/3] KVM: Don't touch the virtual apic vt registers on 32-bit Avi Kivity
2006-12-12 13:59 ` [PATCH 3/3] KVM: Fix vmx hardware_enable() on macbooks Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox