From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create Date: Tue, 22 Dec 2015 13:09:37 -0700 Message-ID: <1450814977.2950.4.camel@redhat.com> References: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson To: Alexey Kardashevskiy Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50824 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964800AbbLVUJj (ORCPT ); Tue, 22 Dec 2015 15:09:39 -0500 In-Reply-To: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2015-12-18 at 12:35 +1100, Alexey Kardashevskiy wrote: > 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. >=20 > This fills gaps with __resv1/2 fields. >=20 > This should not cause any change in behavior. >=20 > Signed-off-by: Alexey Kardashevskiy > --- Applied to next for v4.5 with David's ack. =C2=A0Thanks! Alex > =C2=A0include/uapi/linux/vfio.h | 2 ++ > =C2=A01 file changed, 2 insertions(+) >=20 > 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 { > =C2=A0 __u32 flags; > =C2=A0 /* in */ > =C2=A0 __u32 page_shift; > + __u32 __resv1; > =C2=A0 __u64 window_size; > =C2=A0 __u32 levels; > + __u32 __resv2; > =C2=A0 /* out */ > =C2=A0 __u64 start_addr; > =C2=A0};