Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934615AbbLRBhE (ORCPT ); Thu, 17 Dec 2015 20:37:04 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:37537 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbbLRBhB (ORCPT ); Thu, 17 Dec 2015 20:37:01 -0500 X-IBM-Helo: d23dlp02.au.ibm.com X-IBM-MailFrom: aik@ozlabs.ru X-IBM-RcptTo: kvm@vger.kernel.org;linux-kernel@vger.kernel.org From: Alexey Kardashevskiy To: Alex Williamson Cc: Alexey Kardashevskiy , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson Subject: [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create Date: Fri, 18 Dec 2015 12:35:47 +1100 Message-Id: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 2.5.0.rc3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15121801-0009-0000-0000-0000028E43D4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 37 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/