aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-02-12 03:54:37 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:40 -0500
commitac6c2bc592b90c7f140fc87c49e21bc82376e2aa (patch)
treeeaba4f4f97f9bf17cc0a1abf07637abecca54195 /drivers
parent988ad74ff6107d9a490ee193e41251e27d37c95f (diff)
[PATCH] kvm: Fix mmu going crazy of guest sets cr0.wp == 0
The kvm mmu relies on cr0.wp being set even if the guest does not set it. The vmx code correctly forces cr0.wp at all times, the svm code does not, so it can't boot solaris without this patch. Signed-off-by: Avi Kivity <avi@qumranet.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/kvm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 85f61dd1e936..6b4de4f6c08d 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -723,7 +723,7 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
723 } 723 }
724#endif 724#endif
725 vcpu->svm->cr0 = cr0; 725 vcpu->svm->cr0 = cr0;
726 vcpu->svm->vmcb->save.cr0 = cr0 | CR0_PG_MASK; 726 vcpu->svm->vmcb->save.cr0 = cr0 | CR0_PG_MASK | CR0_WP_MASK;
727 vcpu->cr0 = cr0; 727 vcpu->cr0 = cr0;
728} 728}
729 729