vfio: Add explicit alignments in vfio_iommu_spapr_tce_create
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 18 Dec 2015 01:35:47 +0000 (12:35 +1100)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 21 Dec 2015 22:28:11 +0000 (15:28 -0700)
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>
include/uapi/linux/vfio.h

index 9fd7b5d8df2fa357f434a899cccfa7810f826107..d1172331ca6225d15a3d91de5cb6fcfb594a3244 100644 (file)
@@ -568,8 +568,10 @@ struct vfio_iommu_spapr_tce_create {
        __u32 flags;
        /* in */
        __u32 page_shift;
+       __u32 __resv1;
        __u64 window_size;
        __u32 levels;
+       __u32 __resv2;
        /* out */
        __u64 start_addr;
 };