From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
kvmarm@lists.cs.columbia.edu, linux-mm@kvack.org
Cc: kernel-team@android.com, Sean Christopherson <seanjc@google.com>,
Matthew Wilcox <willy@infradead.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Will Deacon <will@kernel.org>
Subject: [PATCH v2 5/6] KVM: arm64: Use get_page() instead of kvm_get_pfn()
Date: Mon, 26 Jul 2021 16:35:51 +0100 [thread overview]
Message-ID: <20210726153552.1535838-6-maz@kernel.org> (raw)
In-Reply-To: <20210726153552.1535838-1-maz@kernel.org>
When mapping a THP, we are guaranteed that the page isn't reserved,
and we can safely avoid the kvm_is_reserved_pfn() call.
Replace kvm_get_pfn() with get_page(pfn_to_page()).
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ebb28dd4f2c9..b303aa143592 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -840,7 +840,7 @@ transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot,
*ipap &= PMD_MASK;
kvm_release_pfn_clean(pfn);
pfn &= ~(PTRS_PER_PMD - 1);
- kvm_get_pfn(pfn);
+ get_page(pfn_to_page(pfn));
*pfnp = pfn;
return PMD_SIZE;
--
2.30.2
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: 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>,
Paolo Bonzini <pbonzini@redhat.com>,
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: [PATCH v2 5/6] KVM: arm64: Use get_page() instead of kvm_get_pfn()
Date: Mon, 26 Jul 2021 16:35:51 +0100 [thread overview]
Message-ID: <20210726153552.1535838-6-maz@kernel.org> (raw)
In-Reply-To: <20210726153552.1535838-1-maz@kernel.org>
When mapping a THP, we are guaranteed that the page isn't reserved,
and we can safely avoid the kvm_is_reserved_pfn() call.
Replace kvm_get_pfn() with get_page(pfn_to_page()).
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ebb28dd4f2c9..b303aa143592 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -840,7 +840,7 @@ transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot,
*ipap &= PMD_MASK;
kvm_release_pfn_clean(pfn);
pfn &= ~(PTRS_PER_PMD - 1);
- kvm_get_pfn(pfn);
+ get_page(pfn_to_page(pfn));
*pfnp = pfn;
return PMD_SIZE;
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: 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>,
Paolo Bonzini <pbonzini@redhat.com>,
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: [PATCH v2 5/6] KVM: arm64: Use get_page() instead of kvm_get_pfn()
Date: Mon, 26 Jul 2021 16:35:51 +0100 [thread overview]
Message-ID: <20210726153552.1535838-6-maz@kernel.org> (raw)
In-Reply-To: <20210726153552.1535838-1-maz@kernel.org>
When mapping a THP, we are guaranteed that the page isn't reserved,
and we can safely avoid the kvm_is_reserved_pfn() call.
Replace kvm_get_pfn() with get_page(pfn_to_page()).
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ebb28dd4f2c9..b303aa143592 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -840,7 +840,7 @@ transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot,
*ipap &= PMD_MASK;
kvm_release_pfn_clean(pfn);
pfn &= ~(PTRS_PER_PMD - 1);
- kvm_get_pfn(pfn);
+ get_page(pfn_to_page(pfn));
*pfnp = pfn;
return PMD_SIZE;
--
2.30.2
next prev parent reply other threads:[~2021-07-26 15:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 15:35 [PATCH v2 0/6] KVM: Remove kvm_is_transparent_hugepage() and friends Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` [PATCH v2 1/6] KVM: arm64: Introduce helper to retrieve a PTE and its level Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-27 10:29 ` Quentin Perret
2021-07-27 10:29 ` Quentin Perret
2021-07-27 10:29 ` Quentin Perret
2021-07-27 15:25 ` Alexandru Elisei
2021-07-27 15:25 ` Alexandru Elisei
2021-07-27 15:25 ` Alexandru Elisei
2021-07-28 12:17 ` Marc Zyngier
2021-07-28 12:17 ` Marc Zyngier
2021-07-28 12:17 ` Marc Zyngier
2021-07-26 15:35 ` [PATCH v2 2/6] KVM: arm64: Walk userspace page tables to compute the THP mapping size Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-27 15:55 ` Alexandru Elisei
2021-07-27 15:55 ` Alexandru Elisei
2021-07-27 15:55 ` Alexandru Elisei
2021-07-26 15:35 ` [PATCH v2 3/6] KVM: arm64: Avoid mapping size adjustment on permission fault Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-27 16:00 ` Alexandru Elisei
2021-07-27 16:00 ` Alexandru Elisei
2021-07-27 16:00 ` Alexandru Elisei
2021-07-26 15:35 ` [PATCH v2 4/6] KVM: Remove kvm_is_transparent_hugepage() and PageTransCompoundMap() Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier [this message]
2021-07-26 15:35 ` [PATCH v2 5/6] KVM: arm64: Use get_page() instead of kvm_get_pfn() Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-27 17:46 ` Alexandru Elisei
2021-07-27 17:46 ` Alexandru Elisei
2021-07-27 17:46 ` Alexandru Elisei
2021-07-26 15:35 ` [PATCH v2 6/6] KVM: Get rid " Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-07-26 15:35 ` Marc Zyngier
2021-08-02 13:39 ` [PATCH v2 0/6] KVM: Remove kvm_is_transparent_hugepage() and friends Marc Zyngier
2021-08-02 13:39 ` Marc Zyngier
2021-08-02 13:39 ` Marc Zyngier
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=20210726153552.1535838-6-maz@kernel.org \
--to=maz@kernel.org \
--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=pbonzini@redhat.com \
--cc=seanjc@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.