mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Maciej S . Szmigiero" <maciej.szmigiero@oracle.com>,
	Ben Gardon <bgardon@google.com>
Subject: Re: [PATCH 1/3] KVM: x86/mmu: Drop a redundant, broken remote TLB flush
Date: Fri, 22 Oct 2021 18:39:29 +0300	[thread overview]
Message-ID: <b17bbdd2872513ba98daac63b5bf3c578bde6a61.camel@redhat.com> (raw)
In-Reply-To: <20211022010005.1454978-2-seanjc@google.com>

On Thu, 2021-10-21 at 18:00 -0700, Sean Christopherson wrote:
> A recent commit to fix the calls to kvm_flush_remote_tlbs_with_address()
> in kvm_zap_gfn_range() inadvertantly added yet another flush instead of
> fixing the existing flush.  Drop the redundant flush, and fix the params
> for the existing flush.
> 
> Fixes: 2822da446640 ("KVM: x86/mmu: fix parameters to kvm_flush_remote_tlbs_with_address")
> Cc: Maxim Levitsky <mlevitsk@redhat.com>
> Cc: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/x86/kvm/mmu/mmu.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index c6ddb042b281..f82b192bba0b 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -5709,13 +5709,11 @@ void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end)
>  		for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++)
>  			flush = kvm_tdp_mmu_zap_gfn_range(kvm, i, gfn_start,
>  							  gfn_end, flush);
> -		if (flush)
> -			kvm_flush_remote_tlbs_with_address(kvm, gfn_start,
> -							   gfn_end - gfn_start);
>  	}
>  
>  	if (flush)
> -		kvm_flush_remote_tlbs_with_address(kvm, gfn_start, gfn_end);
> +		kvm_flush_remote_tlbs_with_address(kvm, gfn_start,
> +						   gfn_end - gfn_start);
>  
>  	kvm_dec_notifier_count(kvm, gfn_start, gfn_end);
>  
Opps, I didn't notice that the revert added back another flush. I probablyhaven't had
the revert in place when I wrote the patch that fixed parameters to 
kvm_flush_remote_tlbs_with_address.

Best regards,
	Maxim Levitsky


  parent reply	other threads:[~2021-10-22 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  1:00 [PATCH 0/3] KVM: x86/mmu: Clean up kvm_zap_gfn_range() Sean Christopherson
2021-10-22  1:00 ` [PATCH 1/3] KVM: x86/mmu: Drop a redundant, broken remote TLB flush Sean Christopherson
2021-10-22  2:58   ` Lai Jiangshan
2021-10-22  3:03     ` Lai Jiangshan
2021-10-22 15:39   ` Maxim Levitsky [this message]
2021-10-22  1:00 ` [PATCH 2/3] KVM: x86/mmu: Drop a redundant remote TLB flush in kvm_zap_gfn_range() Sean Christopherson
2021-10-22 11:44   ` Maciej S. Szmigiero
2021-10-25 15:39     ` Sean Christopherson
2021-10-26 14:22       ` Maciej S. Szmigiero
2021-10-22  1:00 ` [PATCH 3/3] KVM: x86/mmu: Extract zapping of rmaps for gfn range to separate helper Sean Christopherson
2021-10-22 15:11 ` [PATCH 0/3] KVM: x86/mmu: Clean up kvm_zap_gfn_range() Paolo Bonzini

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=b17bbdd2872513ba98daac63b5bf3c578bde6a61.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=bgardon@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.szmigiero@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /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®