Re: [PATCH v2 04/12] KVM: arm64: Add bit masks for HAFGRTR_EL2

Mark Brown
2023-12-07T17:20:02Z

[-- Attachment #1.1: Type: text/plain, Size: 756 bytes --]

On Wed, Dec 06, 2023 at 10:04:54AM +0000, Fuad Tabba wrote:
> To support HAFGRTR_EL2 supported in nested virt in the following
> patch, first add its bitmask definitions based on the 2023-09
> Arm Architecture System Registers xml specification [*].
>
> [*] https://developer.arm.com/downloads/-/exploration-tools

DDI0601 is a more stable name, and I'd have expected an "arm64/sysreg"
subject.

> +#define __HAFGRTR_EL2_RES0 (GENMASK(63, 50) | GENMASK(16, 5))
> +#define __HAFGRTR_EL2_MASK (GENMASK(49, 17) | GENMASK(4, 0))
> +#define __HAFGRTR_EL2_nMASK 0UL
> +

This one is an example of something where some manual encoding does make
sense given all the AMCNTEN<x> and so on fields so:

Reviewed-by: Mark Brown <broonie@kernel.org>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]