mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>, linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@linux.alibaba.com>, kvm@vger.kernel.org
Subject: Re: [PATCH V2 03/10] KVM: Remove tlbs_dirty
Date: Thu, 23 Sep 2021 17:23:05 +0200	[thread overview]
Message-ID: <8dfdae11-7c51-530d-5c0d-83f778fa1e14@redhat.com> (raw)
In-Reply-To: <20210918005636.3675-4-jiangshanlai@gmail.com>

On 18/09/21 02:56, Lai Jiangshan wrote:
> From: Lai Jiangshan <laijs@linux.alibaba.com>
> 
> There is no user of tlbs_dirty.
> 
> Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
> ---
>   include/linux/kvm_host.h | 1 -
>   virt/kvm/kvm_main.c      | 9 +--------
>   2 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index e4d712e9f760..3b7846cd0637 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -608,7 +608,6 @@ struct kvm {
>   	unsigned long mmu_notifier_range_start;
>   	unsigned long mmu_notifier_range_end;
>   #endif
> -	long tlbs_dirty;
>   	struct list_head devices;
>   	u64 manual_dirty_log_protect;
>   	struct dentry *debugfs_dentry;
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 3e67c93ca403..6d6be42ec78d 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -312,12 +312,6 @@ EXPORT_SYMBOL_GPL(kvm_make_all_cpus_request);
>   #ifndef CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL
>   void kvm_flush_remote_tlbs(struct kvm *kvm)
>   {
> -	/*
> -	 * Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in
> -	 * kvm_make_all_cpus_request.
> -	 */
> -	long dirty_count = smp_load_acquire(&kvm->tlbs_dirty);
> -
>   	/*
>   	 * We want to publish modifications to the page tables before reading
>   	 * mode. Pairs with a memory barrier in arch-specific code.
> @@ -332,7 +326,6 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
>   	if (!kvm_arch_flush_remote_tlb(kvm)
>   	    || kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
>   		++kvm->stat.generic.remote_tlb_flush;
> -	cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
>   }
>   EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs);
>   #endif
> @@ -537,7 +530,7 @@ static __always_inline int __kvm_handle_hva_range(struct kvm *kvm,
>   		}
>   	}
>   
> -	if (range->flush_on_ret && (ret || kvm->tlbs_dirty))
> +	if (range->flush_on_ret && ret)
>   		kvm_flush_remote_tlbs(kvm);
>   
>   	if (locked)
> 

Queued up to here for 5.15, thanks!

Paolo


  reply	other threads:[~2021-09-23 15:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18  0:56 [PATCH V2 00/10] KVM: X86: MMU: misc fixes and cleanups Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 01/10] KVM: X86: Fix missed remote tlb flush in rmap_write_protect() Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 02/10] KVM: X86: Synchronize the shadow pagetable before link it Lai Jiangshan
2021-09-23 14:36   ` Paolo Bonzini
2021-09-18  0:56 ` [PATCH V2 03/10] KVM: Remove tlbs_dirty Lai Jiangshan
2021-09-23 15:23   ` Paolo Bonzini [this message]
2021-09-24 15:40     ` Lai Jiangshan
2021-09-24 16:03       ` Paolo Bonzini
2021-09-18  0:56 ` [PATCH V2 04/10] KVM: X86: Don't flush current tlb on shadow page modification Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 05/10] KVM: X86: Remove kvm_mmu_flush_or_zap() Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 06/10] KVM: X86: Change kvm_sync_page() to return true when remote flush is needed Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 07/10] KVM: X86: Zap the invalid list after remote tlb flushing Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 08/10] KVM: X86: Remove FNAME(update_pte) Lai Jiangshan
2021-09-18  1:49   ` Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 09/10] KVM: X86: Don't unsync pagetables when speculative Lai Jiangshan
2021-09-18  0:56 ` [PATCH V2 10/10] KVM: X86: Don't check unsync if the original spte is writible Lai Jiangshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8dfdae11-7c51-530d-5c0d-83f778fa1e14@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jiangshanlai@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=laijs@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®