]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Check RAZ visibility in ID register accessors
authorAndrew Jones <drjones@redhat.com>
Thu, 5 Nov 2020 09:10:21 +0000 (10:10 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 6 Nov 2020 16:00:29 +0000 (16:00 +0000)
commit7d0bff4bb9a3f0a266e0ea54af85e9d1fba2015f
treeed4dd944ade856e5536271a1055d3771ccdba752
parente65eaf42816d8f3f9d67bde9a9fea799e4c9eaf3
KVM: arm64: Check RAZ visibility in ID register accessors

The instruction encodings of ID registers are preallocated. Until an
encoding is assigned a purpose the register is RAZ. KVM's general ID
register accessor functions already support both paths, RAZ or not.
If for each ID register we can determine if it's RAZ or not, then all
ID registers can build on the general functions. The register visibility
function allows us to check whether a register should be completely
hidden or not, extending it to also report when the register should
be RAZ or not allows us to use it for ID registers as well.

Check for RAZ visibility in the ID register accessor functions,
allowing the RAZ case to be handled in a generic way for all system
registers.

The new REG_RAZ flag will be used in a later patch. This patch has
no intended functional change.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201105091022.15373-4-drjones@redhat.com
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.h