linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create
@ 2015-12-18  1:35 Alexey Kardashevskiy
  2015-12-21  0:56 ` David Gibson
  2015-12-22 20:09 ` Alex Williamson
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2015-12-18  1:35 UTC (permalink / raw)
  To: Alex Williamson; +Cc: Alexey Kardashevskiy, kvm, linux-kernel, David Gibson

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>
---
 include/uapi/linux/vfio.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 9fd7b5d..d117233 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -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;
 };
-- 
2.5.0.rc3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-22 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  1:35 [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create Alexey Kardashevskiy
2015-12-21  0:56 ` David Gibson
2015-12-22 20:09 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).