KVM: Make paravirt tlb flush also reload the PAE PDPTRs
authorAvi Kivity <avi@redhat.com>
Sun, 24 May 2009 19:15:25 +0000 (22:15 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 25 May 2009 17:00:50 +0000 (20:00 +0300)
The paravirt tlb flush may be used not only to flush TLBs, but also
to reload the four page-directory-pointer-table entries, as it is used
as a replacement for reloading CR3.  Change the code to do the entire
CR3 reloading dance instead of simply flushing the TLB.

Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c

index b6caf1329b1b12e003dff8f8d761f67e39810f2f..32cf11e5728a2c1c444c407dfc287b8adf1c3c40 100644 (file)
@@ -2897,8 +2897,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu,
 
 static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu)
 {
-       kvm_x86_ops->tlb_flush(vcpu);
-       set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests);
+       kvm_set_cr3(vcpu, vcpu->arch.cr3);
        return 1;
 }