Commit 77d6bd47 authored by Alexey Kardashevskiy's avatar Alexey Kardashevskiy Committed by Alex Williamson

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: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 96762882
...@@ -568,8 +568,10 @@ struct vfio_iommu_spapr_tce_create { ...@@ -568,8 +568,10 @@ struct vfio_iommu_spapr_tce_create {
__u32 flags; __u32 flags;
/* in */ /* in */
__u32 page_shift; __u32 page_shift;
__u32 __resv1;
__u64 window_size; __u64 window_size;
__u32 levels; __u32 levels;
__u32 __resv2;
/* out */ /* out */
__u64 start_addr; __u64 start_addr;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment