All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v2 0/2] arm/arm64: teach virt_to_pte_phys() about block descriptors
@ 2022-11-24 15:28 ` Alexandru Elisei
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandru Elisei @ 2022-11-24 15:28 UTC (permalink / raw)
  To: andrew.jones, kvm, kvmarm, kvmarm

I was writing a quick test when I noticed that arm's implementation of
__virt_to_phys(), which ends up calling virt_to_pte_phys(), doesn't handle
block mappings and returns a bogus value. When fixing it I got confused
about mmu_get_pte() and get_pte(), so I (hopefully) improved things by
renaming mmu_get_pte() to follow_pte().

Changes since v1:

- Dropped patch #1 ("lib/vmalloc: Treat virt_to_pte_phys() as returning a
  physical address") because it was incorrect.
- Dropped the check for pte_valid() for the return value of mmu_get_pte() in
  patch #1 because mmu_get_pte() returns NULL for an invalid descriptor.

Lightly tested on a rockpro64 (4k and 64k pages, arm64 and arm, qemu only)
because the changes from the previous version are trivial.

Alexandru Elisei (2):
  arm/arm64: mmu: Teach virt_to_pte_phys() about block descriptors
  arm/arm64: mmu: Rename mmu_get_pte() -> follow_pte()

 lib/arm/asm/mmu-api.h |  2 +-
 lib/arm/mmu.c         | 88 +++++++++++++++++++++++++------------------
 2 files changed, 53 insertions(+), 37 deletions(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-14 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 15:28 [kvm-unit-tests PATCH v2 0/2] arm/arm64: teach virt_to_pte_phys() about block descriptors Alexandru Elisei
2022-11-24 15:28 ` Alexandru Elisei
2022-11-24 15:28 ` [kvm-unit-tests PATCH v2 1/2] arm/arm64: mmu: Teach " Alexandru Elisei
2022-11-24 15:28   ` Alexandru Elisei
2022-11-24 15:28 ` [kvm-unit-tests PATCH v2 2/2] arm/arm64: mmu: Rename mmu_get_pte() -> follow_pte() Alexandru Elisei
2022-11-24 15:28   ` Alexandru Elisei
2023-02-14 20:23 ` [kvm-unit-tests PATCH v2 0/2] arm/arm64: teach virt_to_pte_phys() about block descriptors Andrew Jones

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.