Re: [kvm-unit-tests PATCH v7 04/18] x86: pmu: Align fields in pmu_counter_t to better pack the struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/2025 9:36 AM, Sean Christopherson wrote:
> From: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
>
> Hoist "idx" up in the pmu_counter_t structure so that the structure is
> naturally packed for 64-bit builds.
>
> Signed-off-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/r/20240914101728.33148-5-dapeng1.mi@xxxxxxxxxxxxxxx
> [sean: rewrite changelog]
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Thanks for root causing the issue and rewriting the change log.


> ---
>  x86/pmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/x86/pmu.c b/x86/pmu.c
> index 60db8bdf..a0268db8 100644
> --- a/x86/pmu.c
> +++ b/x86/pmu.c
> @@ -21,9 +21,9 @@
>  
>  typedef struct {
>  	uint32_t ctr;
> +	uint32_t idx;
>  	uint64_t config;
>  	uint64_t count;
> -	int idx;
>  } pmu_counter_t;
>  
>  struct pmu_event {




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux