KVM: arm64: Refactor filtering of ID registers
authorMarc Zyngier <maz@kernel.org>
Sat, 15 Feb 2020 17:07:32 +0000 (17:07 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 3 Feb 2021 11:00:01 +0000 (11:00 +0000)
commitc8857935587c6335a1beb40bd2c5e8405c4626ae
treeb7a599c0dc60b559371740e020a55181aa29483f
parent99b6a4013fe9331e462ccad351a8ac7a2cb330d6
KVM: arm64: Refactor filtering of ID registers

Our current ID register filtering is starting to be a mess of if()
statements, and isn't going to get any saner.

Let's turn it into a switch(), which has a chance of being more
readable, and introduce a FEATURE() macro that allows easy generation
of feature masks.

No functionnal change intended.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c