[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <638de1c3-0efd-9319-4dcb-86c3ac88ebf3@redhat.com>
Date: Mon, 15 Oct 2018 12:12:07 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: lantianyu1986@...il.com
Cc: Lan Tianyu <Tianyu.Lan@...rosoft.com>, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, x86@...nel.org,
rkrcmar@...hat.com, devel@...uxdriverproject.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
michael.h.kelley@...rosoft.com, vkuznets@...hat.com
Subject: Re: [PATCH V4 9/15] KVM: Add flush_link and parent_pte in the struct
kvm_mmu_page
On 13/10/2018 16:54, lantianyu1986@...il.com wrote:
> From: Lan Tianyu <Tianyu.Lan@...rosoft.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@...rosoft.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
Powered by blists - more mailing lists