Commit f6de8edc authored by Will Deacon's avatar Will Deacon Committed by Will Deacon
Browse files

UPSTREAM: KVM: arm64: Prevent re-finalisation of pKVM for a given CPU



__pkvm_prot_finalize() completes the deprivilege of the host when pKVM
is in use by installing a stage-2 translation table for the calling CPU.

Issuing the hypercall multiple times for a given CPU makes little sense,
but in such a case just return early with -EPERM rather than go through
the whole page-table dance again.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-6-will@kernel.org


(cherry picked from commit 07036cff)
Bug: 204960018
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: I79dc15319bd3dc09233d95cfaa07d020e8a57973
parent 35aeb981
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment