lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] KVM: MMU: initialize sptes early
    Date
    Otherwise, the following kvm_sync_pages() will see invalid sptes in a new
    shadow page.

    Signed-off-by: Zhao Jin <cronozhj@gmail.com>
    ---
    arch/x86/kvm/mmu.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
    index 8e8da79..d7e1694 100644
    --- a/arch/x86/kvm/mmu.c
    +++ b/arch/x86/kvm/mmu.c
    @@ -1692,6 +1692,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
    return sp;
    sp->gfn = gfn;
    sp->role = role;
    + init_shadow_page_table(sp);
    hlist_add_head(&sp->hash_link,
    &vcpu->kvm->arch.mmu_page_hash[kvm_page_table_hashfn(gfn)]);
    if (!direct) {
    @@ -1702,7 +1703,6 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,

    account_shadowed(vcpu->kvm, gfn);
    }
    - init_shadow_page_table(sp);
    trace_kvm_mmu_get_page(sp, true);
    return sp;
    }
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2011-10-24 09:25    [W:0.019 / U:0.756 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site