[PATCH] KVM: Remove subtle "struct kvm_stats_desc" pseudo-overlay

Anup Patel anup at brainfault.org
Sat Dec 6 21:14:13 PST 2025


On Sat, Dec 6, 2025 at 4:57 AM Sean Christopherson <seanjc at google.com> wrote:
>
> Remove KVM's internal pseudo-overlay of kvm_stats_desc, which subtly
> aliases the flexible name[] in the uAPI definition with a fixed-size array
> of the same name.  The unusual embedded structure results in compiler
> warnings due to -Wflex-array-member-not-at-end, and also necessitates an
> extra level of dereferencing in KVM.  To avoid the "overlay", define the
> uAPI structure to have a fixed-size name when building for the kernel.
>
> Opportunistically clean up the indentation for the stats macros, and
> replace spaces with tabs.
>
> No functional change intended.
>
> Reported-by: Gustavo A. R. Silva <gustavoars at kernel.org>
> Closes: https://lore.kernel.org/all/aPfNKRpLfhmhYqfP@kspp
> Signed-off-by: Sean Christopherson <seanjc at google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup at brainfault.org>

Thanks,
Anup



More information about the linux-arm-kernel mailing list