aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 19:36:41 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:24 -0500
commit1b0973bd8f788178f21d9eebdd879203464f8528 (patch)
tree265524c2c66575cf6c64fd81d1a86611aa881040 /drivers/kvm/kvm_main.c
parent17ac10ad2bb7d8c4f401668484b2e661a15726c6 (diff)
[PATCH] KVM: MMU: Use the guest pdptrs instead of mapping cr3 in pae mode
This lets us not write protect a partial page, and is anyway what a real processor does. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 4512d8c39c84..68e121eeccbc 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1491,6 +1491,8 @@ static int kvm_dev_ioctl_set_sregs(struct kvm *kvm, struct kvm_sregs *sregs)
1491 1491
1492 mmu_reset_needed |= vcpu->cr4 != sregs->cr4; 1492 mmu_reset_needed |= vcpu->cr4 != sregs->cr4;
1493 kvm_arch_ops->set_cr4(vcpu, sregs->cr4); 1493 kvm_arch_ops->set_cr4(vcpu, sregs->cr4);
1494 if (!is_long_mode(vcpu) && is_pae(vcpu))
1495 load_pdptrs(vcpu, vcpu->cr3);
1494 1496
1495 if (mmu_reset_needed) 1497 if (mmu_reset_needed)
1496 kvm_mmu_reset_context(vcpu); 1498 kvm_mmu_reset_context(vcpu);