lkml.org 
[lkml]   [2018]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH V4 9/15] KVM: Add flush_link and parent_pte in the struct kvm_mmu_page
    From
    Date
    On 13/10/2018 16:54, lantianyu1986@gmail.com wrote:
    > From: Lan Tianyu <Tianyu.Lan@microsoft.com>
    >
    > PV EPT tlb flush function will accept a list of flush ranges and
    > use struct kvm_mmu_page as the list entry.
    >
    > Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
    > ---
    > arch/x86/include/asm/kvm_host.h | 1 +
    > 1 file changed, 1 insertion(+)
    >
    > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
    > index 19985c602ed6..8279235285f8 100644
    > --- a/arch/x86/include/asm/kvm_host.h
    > +++ b/arch/x86/include/asm/kvm_host.h
    > @@ -316,6 +316,7 @@ struct kvm_rmap_head {
    >
    > struct kvm_mmu_page {
    > struct list_head link;
    > + struct list_head flush_link;

    This can be an hlist. However, you are not documenting what's the
    locking here. There are many places in which KVM does a
    "cond_resched_lock(&vcpu->kvm->mmu_lock);" and you need to explain how
    flush_link is not live across that.

    I would start from a simpler patch that just uses the list-based flush
    in kvm_mmu_commit_zap_page, where you already have the list of things to
    flush as invalid_list.

    > struct hlist_node hash_link;
    > bool unsync;
    >
    >

    Also this is not adding parent_pte, so the subject is incorrect.

    Paolo

    \
     
     \ /
      Last update: 2018-10-15 12:13    [W:4.037 / U:1.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site