]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Enforce reserved bits for PSCI target affinities
authorOliver Upton <oupton@google.com>
Wed, 18 Aug 2021 20:21:32 +0000 (20:21 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Aug 2021 08:08:57 +0000 (09:08 +0100)
commitd908d7fd4eb9a2682c36a05a2e31598e29b1b27a
tree62d7304a52743a1e606b1ba475f8595bd47b36fe
parent624832c3d434c9bed9d5572a987d1a92ae756bf2
KVM: arm64: Enforce reserved bits for PSCI target affinities

According to the PSCI specification, ARM DEN 0022D, 5.1.4 "CPU_ON", the
CPU_ON function takes a target_cpu argument that is bit-compatible with
the affinity fields in MPIDR_EL1. All other bits in the argument are
RES0. Note that the same constraints apply to the target_affinity
argument for the AFFINITY_INFO call.

Enforce the spec by returning INVALID_PARAMS if a guest incorrectly sets
a RES0 bit.

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