KVM: arm64: Return -EPERM from __pkvm_host_share_hyp()
authorQuentin Perret <qperret@google.com>
Wed, 11 Aug 2021 17:36:25 +0000 (18:36 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Aug 2021 18:40:53 +0000 (19:40 +0100)
commit12593568d7319c34c72038ea799ab1bd0f0eb01c
treefb97e6a0b05223181cdc19eca80bb2a49a268e2b
parent64a80fb766f9a91e26930bfc56d8e7c12425df12
KVM: arm64: Return -EPERM from __pkvm_host_share_hyp()

Fix the error code returned by __pkvm_host_share_hyp() when the
host attempts to share with EL2 a page that has already been shared with
another entity.

Reported-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/20210811173630.2536721-1-qperret@google.com
arch/arm64/kvm/hyp/nvhe/mem_protect.c