lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path
    We should flush all tlbs after drop spte on sync_page path since:

    Quote from Avi:
    | sync_page
    | drop_spte
    | kvm_mmu_notifier_invalidate_page
    | kvm_unmap_rmapp
    | spte doesn't exist -> no flush
    | page is freed
    | guest can write into freed page?

    Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
    ---
    arch/x86/kvm/paging_tmpl.h | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
    index 590bf12..ca0e5e8 100644
    --- a/arch/x86/kvm/paging_tmpl.h
    +++ b/arch/x86/kvm/paging_tmpl.h
    @@ -786,6 +786,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
    else
    nonpresent = shadow_notrap_nonpresent_pte;
    drop_spte(vcpu->kvm, &sp->spt[i], nonpresent);
    + kvm_flush_remote_tlbs(vcpu->kvm);
    continue;
    }

    --
    1.7.0.4

    \
     
     \ /
      Last update: 2010-11-19 09:59    [W:0.025 / U:0.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site