linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	seanjc@google.com, "open list:MIPS" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH 1/4] KVM: constify kvm_arch_flush_remote_tlbs_memslot
Date: Sat, 3 Apr 2021 10:28:06 +0800	[thread overview]
Message-ID: <CAAhV-H7Sr8V7A4DdXx158PJ1dT+9zSgUsFQa1LLuZnq+TFR0aw@mail.gmail.com> (raw)
In-Reply-To: <20210402155807.49976-2-pbonzini@redhat.com>

Reviewed-by: Huacai Chen <chenhuacai@kernel.org>

On Fri, Apr 2, 2021 at 11:58 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> memslots are stored in RCU and there should be no need to
> change them.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/arm64/kvm/arm.c     | 2 +-
>  arch/mips/kvm/mips.c     | 2 +-
>  arch/x86/kvm/mmu/mmu.c   | 2 +-
>  include/linux/kvm_host.h | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 7f06ba76698d..9141730b7963 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -1268,7 +1268,7 @@ void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot)
>  }
>
>  void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
> -                                       struct kvm_memory_slot *memslot)
> +                                       const struct kvm_memory_slot *memslot)
>  {
>         kvm_flush_remote_tlbs(kvm);
>  }
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 58a8812e2fa5..7db8234a4407 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -997,7 +997,7 @@ void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot)
>  }
>
>  void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
> -                                       struct kvm_memory_slot *memslot)
> +                                       const struct kvm_memory_slot *memslot)
>  {
>         /* Let implementation handle TLB/GVA invalidation */
>         kvm_mips_callbacks->flush_shadow_memslot(kvm, memslot);
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 0d92a269c5fa..f75c677910c9 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -5616,7 +5616,7 @@ void kvm_mmu_zap_collapsible_sptes(struct kvm *kvm,
>  }
>
>  void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
> -                                       struct kvm_memory_slot *memslot)
> +                                       const struct kvm_memory_slot *memslot)
>  {
>         /*
>          * All current use cases for flushing the TLBs for a specific memslot
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index e6d77353025c..34a974ffc882 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -894,7 +894,7 @@ void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot);
>
>  #ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
>  void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
> -                                       struct kvm_memory_slot *memslot);
> +                                       const struct kvm_memory_slot *memslot);
>  #else /* !CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT */
>  int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log);
>  int kvm_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log,
> --
> 2.30.1
>
>

  reply	other threads:[~2021-04-03  2:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 15:58 [PATCH 0/4] KVM: MIPS: cleanup TLB flushing callbacks Paolo Bonzini
2021-04-02 15:58 ` [PATCH 1/4] KVM: constify kvm_arch_flush_remote_tlbs_memslot Paolo Bonzini
2021-04-03  2:28   ` Huacai Chen [this message]
2021-04-02 15:58 ` [PATCH 2/4] KVM: MIPS: rework flush_shadow_* callbacks into one that prepares the flush Paolo Bonzini
2021-04-03  2:31   ` Huacai Chen
2021-04-03  7:08     ` Paolo Bonzini
2021-04-03 10:43     ` Paolo Bonzini
2021-04-06  1:36       ` Huacai Chen
2021-04-06  6:05         ` Paolo Bonzini
2021-04-06 11:39           ` Thomas Bogendoerfer
2021-04-06 11:55             ` Paolo Bonzini
2021-04-02 15:58 ` [PATCH 3/4] KVM: MIPS: let generic code call prepare_flush_shadow Paolo Bonzini
2021-04-02 15:58 ` [PATCH 4/4] KVM: MIPS: defer flush to generic MMU notifier code 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=CAAhV-H7Sr8V7A4DdXx158PJ1dT+9zSgUsFQa1LLuZnq+TFR0aw@mail.gmail.com \
    --to=chenhuacai@kernel.org \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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;
as well as URLs for NNTP newsgroup(s).