Message ID | 20181013145406.4911-10-Tianyu.Lan@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM | expand |
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
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; struct hlist_node hash_link; bool unsync;