lkml.org 
[lkml]   [2012]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 08/13] KVM: MMU: fask check whether page is writable
    On 03/29/2012 11:49 PM, Avi Kivity wrote:

    > 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
    >
    > Does kvm_set_pte_rmapp() need adjustment?
    >


    Yes, in kvm_set_pte_rmapp(), if the page is host write-protected, it will
    set this bit:

    static void host_page_write_protect(u64 *spte, unsigned long *rmapp)
    {
    if (!(*spte & SPTE_HOST_WRITEABLE) &&
    !(*rmapp & PTE_LIST_WRITE_PROTECT))
    *rmapp |= PTE_LIST_WRITE_PROTECT;
    }

    It is very useful for fast page fault path to avoid useless shadow
    page table waling if KSM is enabled.

    >> Also if no shadow page is indirect, the page is write-free
    >>
    >>
    >> + if (!vcpu->kvm->arch.indirect_shadow_pages)
    >> + return 0;
    >> +
    > Best in its own little patch.
    >

    Okay, will split it into a little patch.



    \
     
     \ /
      Last update: 2012-03-30 07:13    [W:0.019 / U:92.848 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site