]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: smp: disable hotplug on trusted OS resident CPU
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 12 Jun 2019 12:51:37 +0000 (13:51 +0100)
committerWill Deacon <will@kernel.org>
Thu, 15 Aug 2019 10:12:03 +0000 (11:12 +0100)
commit8350d24d60dc62f125659d632ea1f55a3caf78a8
treef9f03d19dc8328624ac57d92da43c8155561b8d5
parent649f6def3e9208402e57a53fd052e49fb7e4a523
arm64: smp: disable hotplug on trusted OS resident CPU

The trusted OS may reject CPU_OFF calls to its resident CPU, so we must
avoid issuing those. We never migrate a Trusted OS and we already take
care to prevent CPU_OFF PSCI call. However, this is not reflected
explicitly to the userspace. Any user can attempt to hotplug trusted OS
resident CPU. The entire motion of going through the various state
transitions in the CPU hotplug state machine gets executed and the
PSCI layer finally refuses to make CPU_OFF call.

This results is unnecessary unwinding of CPU hotplug state machine in
the kernel. Instead we can mark the trusted OS resident CPU as not
available for hotplug, so that the user attempt or request to do the
same will get immediately rejected.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpu_ops.h
arch/arm64/kernel/psci.c
arch/arm64/kernel/setup.c