[PATCH 2/3] KVM: arm64: Shuffle KVM_HOST_DATA_FLAG_* indices

Fuad Tabba tabba at google.com
Wed Jan 7 02:49:30 PST 2026


On Tue, 6 Jan 2026 at 17:37, Mark Rutland <mark.rutland at arm.com> wrote:
>
> There's a gap in the KVM_HOST_DATA_FLAG_* indices since the removal of
> KVM_HOST_DATA_FLAG_HOST_SVE_ENABLED and
> KVM_HOST_DATA_FLAG_HOST_SME_ENABLED in commits:
>
> * 459f059be702 ("KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN")
> * 407a99c4654e ("KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN")
>
> Shuffle the indices to remove the gap, as Oliver requested at the time of
> the removals:
>
>   https://lore.kernel.org/linux-arm-kernel/Z6qC4qn47ONfDCSH@linux.dev/
>
> There should be no functional change as a result of this patch.

Tested-by: Fuad Tabba <tabba at google.com>
Reviewed-by: Fuad Tabba <tabba at google.com>

Cheers,
/fuad

>
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Fuad Tabba <tabba at google.com>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Mark Brown <broonie at kernel.org>
> Cc: Oliver Upton <oliver.upton at linux.dev>
> Cc: Will Deacon <will at kernel.org>
> ---
>  arch/arm64/include/asm/kvm_host.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index ac7f970c78830..4c8b4274f669e 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -710,11 +710,11 @@ struct cpu_sve_state {
>  struct kvm_host_data {
>  #define KVM_HOST_DATA_FLAG_HAS_SPE                     0
>  #define KVM_HOST_DATA_FLAG_HAS_TRBE                    1
> -#define KVM_HOST_DATA_FLAG_TRBE_ENABLED                        4
> -#define KVM_HOST_DATA_FLAG_EL1_TRACING_CONFIGURED      5
> -#define KVM_HOST_DATA_FLAG_VCPU_IN_HYP_CONTEXT         6
> -#define KVM_HOST_DATA_FLAG_L1_VNCR_MAPPED              7
> -#define KVM_HOST_DATA_FLAG_HAS_BRBE                    8
> +#define KVM_HOST_DATA_FLAG_TRBE_ENABLED                        2
> +#define KVM_HOST_DATA_FLAG_EL1_TRACING_CONFIGURED      3
> +#define KVM_HOST_DATA_FLAG_VCPU_IN_HYP_CONTEXT         4
> +#define KVM_HOST_DATA_FLAG_L1_VNCR_MAPPED              5
> +#define KVM_HOST_DATA_FLAG_HAS_BRBE                    6
>         unsigned long flags;
>
>         struct kvm_cpu_context host_ctxt;
> --
> 2.30.2
>



More information about the linux-arm-kernel mailing list