lkml.org 
[lkml]   [2012]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 00/13] KVM: MMU: fast page fault
    On 04/09/2012 04:55 PM, Xiao Guangrong wrote:
    >
    > Okay, let's simplify it as possible:
    >
    > - let it only fix the page fault with PFEC.P == 1 && PFEC.W = 0, that means
    > unlock set_spte path can be dropped
    >
    > - let it just fixes the page fault caused by dirty-log that means we always
    > skip the spte which write-protected by shadow page protection.
    >
    > Then, things should be fair simper:
    >
    > In set_spte path, if the spte can be writable, we set ALLOW_WRITE bit
    > In rmap_write_protect:
    > if (spte.PT_WRITABLE_MASK) {
    > WARN_ON(!(spte & ALLOW_WRITE));
    > spte &= ~PT_WRITABLE_MASK;
    > spte |= WRITE_PROTECT;
    > }
    >
    > in fast page fault:
    >
    > if (spte & PT_WRITABLE_MASK)
    > return_go_guest;
    >
    > if ((spte & ALLOW_WRITE) && !(spte & WRITE_PROTECT))
    > cmpxchg spte + PT_WRITABLE_MASK
    >
    > The information all we needed comes from spte it is independence from other path,
    > and no barriers.
    >
    >
    > Hmm, how about this one?
    >

    I like it. WRITE_PROTECT is better than my ALLOW_WRITES, the meaning is
    clearer.

    --
    error compiling committee.c: too many arguments to function



    \
     
     \ /
      Last update: 2012-04-09 16:27    [W:0.026 / U:0.796 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site