xen/arm: Import ID features sanitize from linux
authorBertrand Marquis <bertrand.marquis@arm.com>
Thu, 16 Sep 2021 06:25:35 +0000 (07:25 +0100)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Thu, 16 Sep 2021 21:15:41 +0000 (14:15 -0700)
commit3918da3abd41d5b08ba4484711a70c1441ae4110
tree6a9729edefc57fcad067ef148dec1ae74c3eb279
parentb1cbe8c8ef5c9cac77edbf42c32e2cf16826b85d
xen/arm: Import ID features sanitize from linux

Import structures declared in Linux file arch/arm64/kernel/cpufeature.c
and the required types from arch/arm64/include/asm/cpufeature.h.

Current code has been imported from Linux 5.13-rc5 (Commit ID
cd1245d75ce93b8fd206f4b34eb58bcfe156d5e9) and copied into cpufeature.c
in arm64 code and cpufeature.h in arm64 specific headers.

Those structure will be used to sanitize the cpu features available to
the ones availble on all cores of a system even if we are on an
heterogeneous platform (from example a big/LITTLE).

For each feature field of all ID registers, those structures define what
is the safest value and if we can allow to have different values in
different cores.

This patch is introducing Linux code without any changes to it.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/cpufeature.c [new file with mode: 0644]
xen/include/asm-arm/arm64/cpufeature.h [new file with mode: 0644]