]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: pkvm: Refcount the pages shared with EL2
authorQuentin Perret <qperret@google.com>
Wed, 15 Dec 2021 16:12:24 +0000 (16:12 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 12:58:56 +0000 (12:58 +0000)
commitf4d755dc1c5d92e0687d221f434f85034cda704f
tree6afc533f512b43a468caa968c8c4de71dc8d5eb9
parentf3aaf652c0f7961a1f024b9de836c637fc9bdb24
KVM: arm64: pkvm: Refcount the pages shared with EL2

In order to simplify the page tracking infrastructure at EL2 in nVHE
protected mode, move the responsibility of refcounting pages that are
shared multiple times on the host. In order to do so, let's create a
red-black tree tracking all the PFNs that have been shared, along with
a refcount.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211215161232.1480836-8-qperret@google.com
arch/arm64/kvm/mmu.c