From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964878AbbLVUJk (ORCPT ); Tue, 22 Dec 2015 15:09:40 -0500 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 Message-ID: <1450814977.2950.4.camel@redhat.com> Subject: Re: [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create From: Alex Williamson To: Alexey Kardashevskiy Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson Date: Tue, 22 Dec 2015 13:09:37 -0700 In-Reply-To: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> References: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > This fills gaps with __resv1/2 fields. > > This should not cause any change in behavior. > > Signed-off-by: Alexey Kardashevskiy > --- Applied to next for v4.5 with David's ack.  Thanks! Alex >  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; >  };