From: Paolo Bonzini <pbonzini@redhat.com>
To: Marc Zyngier <maz@kernel.org>,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
kvmarm@lists.cs.columbia.edu, linux-mm@kvack.org
Cc: Sean Christopherson <seanjc@google.com>,
Matthew Wilcox <willy@infradead.org>,
Will Deacon <will@kernel.org>,
Quentin Perret <qperret@google.com>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
kernel-team@android.com
Subject: Re: [PATCH 5/5] KVM: Get rid of kvm_get_pfn()
Date: Mon, 19 Jul 2021 08:31:45 +0200 [thread overview]
Message-ID: <ef15f26a-4701-9d8c-b856-e7bb717a69f9@redhat.com> (raw)
In-Reply-To: <20210717095541.1486210-6-maz@kernel.org>
On 17/07/21 11:55, Marc Zyngier wrote:
> Nobody is using kvm_get_pfn() anymore. Get rid of it.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> 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 ae7735b490b4..9818d271c2a1 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -824,7 +824,6 @@ void kvm_release_pfn_clean(kvm_pfn_t pfn);
> void kvm_release_pfn_dirty(kvm_pfn_t pfn);
> void kvm_set_pfn_dirty(kvm_pfn_t pfn);
> void kvm_set_pfn_accessed(kvm_pfn_t pfn);
> -void kvm_get_pfn(kvm_pfn_t pfn);
>
> void kvm_release_pfn(kvm_pfn_t pfn, bool dirty, struct gfn_to_pfn_cache *cache);
> int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset,
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 2e410a8a6a67..0284418c4400 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2215,7 +2215,7 @@ static int hva_to_pfn_remapped(struct vm_area_struct *vma,
> * Get a reference here because callers of *hva_to_pfn* and
> * *gfn_to_pfn* ultimately call kvm_release_pfn_clean on the
> * returned pfn. This is only needed if the VMA has VM_MIXEDMAP
> - * set, but the kvm_get_pfn/kvm_release_pfn_clean pair will
> + * set, but the kvm_try_get_pfn/kvm_release_pfn_clean pair will
> * simply do nothing for reserved pfns.
> *
> * Whoever called remap_pfn_range is also going to call e.g.
> @@ -2612,13 +2612,6 @@ void kvm_set_pfn_accessed(kvm_pfn_t pfn)
> }
> EXPORT_SYMBOL_GPL(kvm_set_pfn_accessed);
>
> -void kvm_get_pfn(kvm_pfn_t pfn)
> -{
> - if (!kvm_is_reserved_pfn(pfn))
> - get_page(pfn_to_page(pfn));
> -}
> -EXPORT_SYMBOL_GPL(kvm_get_pfn);
> -
> static int next_segment(unsigned long len, int offset)
> {
> if (len > PAGE_SIZE - offset)
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
prev parent reply other threads:[~2021-07-19 6:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-17 9:55 [PATCH 0/5] KVM: Remove kvm_is_transparent_hugepage() and friends Marc Zyngier
2021-07-17 9:55 ` [PATCH 1/5] KVM: arm64: Walk userspace page tables to compute the THP mapping size Marc Zyngier
2021-07-19 6:31 ` Paolo Bonzini
2021-07-19 9:31 ` Marc Zyngier
2021-07-20 17:23 ` Alexandru Elisei
2021-07-20 20:33 ` Sean Christopherson
2021-07-21 14:58 ` Will Deacon
2021-07-21 15:56 ` Sean Christopherson
2021-07-21 16:37 ` Alexandru Elisei
2021-07-23 8:48 ` Marc Zyngier
2021-07-17 9:55 ` [PATCH 2/5] KVM: arm64: Avoid mapping size adjustment on permission fault Marc Zyngier
2021-07-23 15:55 ` Alexandru Elisei
2021-07-23 16:18 ` Marc Zyngier
2021-07-17 9:55 ` [PATCH 3/5] KVM: Remove kvm_is_transparent_hugepage() and PageTransCompoundMap() Marc Zyngier
2021-07-19 6:31 ` Paolo Bonzini
2021-07-17 9:55 ` [PATCH 4/5] KVM: arm64: Use get_page() instead of kvm_get_pfn() Marc Zyngier
2021-07-17 9:55 ` [PATCH 5/5] KVM: Get rid " Marc Zyngier
2021-07-19 6:31 ` Paolo Bonzini [this message]
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=ef15f26a-4701-9d8c-b856-e7bb717a69f9@redhat.com \
--to=pbonzini@redhat.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=kernel-team@android.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=maz@kernel.org \
--cc=qperret@google.com \
--cc=seanjc@google.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).