Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio: Add explicit alignments in vfio_iommu_spapr_tce_create

The vfio_iommu_spapr_tce_create struct has 4x32bit and 2x64bit fields
which should have resulted in sizeof(fio_iommu_spapr_tce_create) equal
to 32 bytes. However due to the gcc's default alignment, the actual
size of this struct is 40 bytes.

This fills gaps with __resv1/2 fields.

This should not cause any change in behavior.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

authored by

Alexey Kardashevskiy and committed by
Alex Williamson
77d6bd47 96762882

+2
+2
include/uapi/linux/vfio.h
··· 568 568 __u32 flags; 569 569 /* in */ 570 570 __u32 page_shift; 571 + __u32 __resv1; 571 572 __u64 window_size; 572 573 __u32 levels; 574 + __u32 __resv2; 573 575 /* out */ 574 576 __u64 start_addr; 575 577 };