]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:15 +0000 (09:48 +0100)
commit3fbf85ed4a23ead27fdc7a07792f92cf3ae8665a
tree6ea2cd131265924a26adb6b4d118cf6634db965e
parent2697b141a96e34cb8ea09cf5e540baa182a51d6f
KVM: arm64: Propagate errors from __pkvm_prot_finalize hypercall

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 2f2e1a5069679491d18cf9021da19b40c56a17f3 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/arm64/kvm/arm.c