KVM: arm64: Move hyp refcount manipulation helpers to common header file
authorQuentin Perret <qperret@google.com>
Thu, 10 Nov 2022 19:02:34 +0000 (19:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 11 Nov 2022 16:40:54 +0000 (16:40 +0000)
commit0f4f7ae10ee4e6403659b2d9ddf05424eecde45b
tree198c7ce2a9083026bfbdd165bc8612498629a2a0
parent30a0b95b1335e12efef89dd78518ed3e4a71a763
KVM: arm64: Move hyp refcount manipulation helpers to common header file

We will soon need to manipulate 'struct hyp_page' refcounts from outside
page_alloc.c, so move the helpers to a common header file to allow them
to be reused easily.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Tested-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221110190259.26861-2-will@kernel.org
arch/arm64/kvm/hyp/include/nvhe/memory.h
arch/arm64/kvm/hyp/nvhe/page_alloc.c