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

From: Marc Zyngier <[email-masked]>
Date: Mon, 08 Dec 2025 10:42:15 +0000

On Fri, 05 Dec 2025 23:26:55 +0000,
Sean Christopherson <[email-masked]> 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 <[email-masked]>
> Closes: https://lore.kernel.org/all/aPfNKRpLfhmhYqfP@kspp
> Signed-off-by: Sean Christopherson <[email-masked]>

Acked-by: Marc Zyngier <[email-masked]>

	M.

-- 
Without deviation from the norm, progress is not possible.