[RFC] ACPI: processor: allow boot CPUs to be hidden by ACPI's _STA method
The kubernetes people want to add CPUs to a VM after it has booted.
On x86, this uses the support for physical CPU hot add, physical and
virtual machines work in the same way.
Arm64 systems don't support physical CPU hot add as no-one has built
one. While adding support for virtual machines is very easy, will
physical machines work in the same way?
Once the 'virtual only' feature reaches distro kernels, it needs to
work on physical hardware that may not have been built yet.
This wouldn't be a problem if we knew that systems that need to support
physical CPU hot add will never exist, but no-one has been willing to
commit to that, even for very short values of never. (10 years)
arm64's current gamut of ACPI tables are based on the assumption that
everything described is present, and everything present is described.
Moving CPUs from possible to present brings with it new caches and
interrupt (re-)distributors. Each table's current ability to describe
hardware needs comparing with the physical CPU hot add system we don't
yet have. (do we need a new GTDT?)
What people want this feature for, is to boot a VM that is capable
of having as many VCPUs as the host, but not to let it bring them
online until someone enters their credit card number on a web page.
(the actual host CPU time consumed seems not to be important)
To do this, while keeping all the resources present, we can use some
of the other _STA bits to reflect whether the CPU is 'available' to
user-space.
This allows the VMMs AML firmware to indicate which CPUs should be
hidden from user-space.
This patch uses the 'hidden from the UI' bit of _STA to prevent
CPUs being registered in sysfs. These should be present, but not
online. Hiding them from sysfs prevents user-space from bringing
them online.
This patch is incomplete as the add/remove stuff needs considering,
as does a notification that the _STA policy has changed for a CPU
that has been present all along.
It may be preferable to use the 'enabled' _STA bit to indicate
the CPU can't be brought online, but everything is as described
by the existing APCI tables.
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment