]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Drop unneeded minor version check from PSCI v1.x handler
authorOliver Upton <oupton@google.com>
Tue, 22 Mar 2022 18:35:38 +0000 (18:35 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 6 Apr 2022 09:39:39 +0000 (10:39 +0100)
commitb0e691b5cc92d82cfe6624203632ed7be5a5f30a
treed514bc21fe4ffb9b5ddf38c0f961c0e161b4dd78
parentcb4d0908336037b28b305d42b5ba6b216a1f6d3a
KVM: arm64: Drop unneeded minor version check from PSCI v1.x handler

We already sanitize the guest's PSCI version when it is being written by
userspace, rejecting unsupported version numbers. Additionally, the
'minor' parameter to kvm_psci_1_x_call() is a constant known at compile
time for all callsites.

Though it is benign, the additional check against the
PSCI kvm_psci_1_x_call() is unnecessary and likely to be missed the next
time KVM raises its maximum PSCI version. Drop the check altogether and
rely on sanitization when the PSCI version is set by userspace.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220322183538.2757758-4-oupton@google.com
arch/arm64/kvm/psci.c