]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Propagate errors from __pkvm_prot_finalize hypercall
authorWill Deacon <will@kernel.org>
Fri, 8 Oct 2021 13:58:37 +0000 (14:58 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 08:07:29 +0000 (09:07 +0100)
commitd80b2719762e5145c4fdaa2a69f20ad185e471a0
tree4995525af2f050b7adab3ef5eddfadd7697fc5d3
parent8c4bb9d93c664f497c930c1f70cfcdcd5a6b5974
KVM: arm64: Propagate errors from __pkvm_prot_finalize hypercall

If the __pkvm_prot_finalize hypercall returns an error, we WARN but fail
to propagate the failure code back to kvm_arch_init().

Pass a pointer to a zero-initialised return variable so that failure
to finalise the pKVM protections on a host CPU can be reported back to
KVM.

Cc: Marc Zyngier <maz@kernel.org>
Cc: 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/20211008135839.1193-5-will@kernel.org
arch/arm64/kvm/arm.c