[lkml]   [2012]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 08/13] KVM: MMU: fask check whether page is writable
    On 03/29/2012 11:25 AM, Xiao Guangrong wrote:
    > Using PTE_LIST_WRITE_PROTECT bit in rmap store the write-protect status to
    > avoid unnecessary shadow page walking
    > Also if no shadow page is indirect, the page is write-free
    > @@ -2262,6 +2291,9 @@ static int mmu_need_write_protect(struct kvm_vcpu *vcpu, gfn_t gfn,
    > }
    > if (need_unsync)
    > kvm_unsync_pages(vcpu, gfn);
    > +
    > + *rmap &= ~PTE_LIST_WRITE_PROTECT;
    > +

    So what are the rules for PTE_LIST_WRITE_PROTECT? Is is a cache for the

    I'd like to understand it, I guess it can be set while write protection
    is unneeded, and cleared on the next check?

    Maybe split into two functions, one the normal mmu_need_write_protect
    (but renamed) and a new mmu_need_write_protect(), with locked and
    unlocked variants, calling the old one.

    error compiling committee.c: too many arguments to function

     \ /
      Last update: 2012-04-01 17:55    [W:0.026 / U:21.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site