Skip to content

Commit

Permalink
vfio: Add explicit alignments in vfio_iommu_spapr_tce_create
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Kardashevskiy authored and Alex Williamson committed Dec 21, 2015
1 parent 9676288 commit 77d6bd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/uapi/linux/vfio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 77d6bd4

Please sign in to comment.