[PATCH] KVM: Don't set guest cr3 from vmx_vcpu_setup()
authorAvi Kivity <avi@qumranet.com>
Sat, 6 Jan 2007 00:36:58 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 6 Jan 2007 07:55:28 +0000 (23:55 -0800)
It overwrites the right cr3 set from mmu setup.  Happens only with the test
harness.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/kvm/vmx.c

index 779d8fc07d31f75d2f34f1f4d82062de9400d8b3..e6ea76cdfdbd8c4d3ecde7418ec152bc5fe7ffb7 100644 (file)
@@ -1027,8 +1027,6 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
        vmcs_writel(GUEST_RIP, 0xfff0);
        vmcs_writel(GUEST_RSP, 0);
 
-       vmcs_writel(GUEST_CR3, 0);
-
        //todo: dr0 = dr1 = dr2 = dr3 = 0; dr6 = 0xffff0ff0
        vmcs_writel(GUEST_DR7, 0x400);