Re: [PATCH 4/5] KVM: arm64: Prevent re-finalisation of pKVM for a given CPU

2021-09-29 Thread Quentin Perret
On Thursday 23 Sep 2021 at 12:22:55 (+0100), Will Deacon wrote: > __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

[PATCH 4/5] KVM: arm64: Prevent re-finalisation of pKVM for a given CPU

2021-09-23 Thread Will Deacon
__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