Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbbLUA7r (ORCPT ); Sun, 20 Dec 2015 19:59:47 -0500 Received: from ozlabs.org ([103.22.144.67]:48983 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbbLUA7p (ORCPT ); Sun, 20 Dec 2015 19:59:45 -0500 Date: Mon, 21 Dec 2015 11:56:22 +1100 From: David Gibson To: Alexey Kardashevskiy Cc: Alex Williamson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH kernel] vfio: Add explicit alignments in vfio_iommu_spapr_tce_create Message-ID: <20151221005622.GR3011@voom.redhat.com> References: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DzFMwNuU1QL7hgxO" Content-Disposition: inline In-Reply-To: <1450402547-38599-1-git-send-email-aik@ozlabs.ru> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2554 Lines: 75 --DzFMwNuU1QL7hgxO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 18, 2015 at 12:35:47PM +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 Oops, that was a bit sloppy. Oh well. Acked-by: David Gibson > --- > include/uapi/linux/vfio.h | 2 ++ > 1 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 { > __u32 flags; > /* in */ > __u32 page_shift; > + __u32 __resv1; > __u64 window_size; > __u32 levels; > + __u32 __resv2; > /* out */ > __u64 start_addr; > }; --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --DzFMwNuU1QL7hgxO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWd041AAoJEGw4ysog2bOSUvwQAIbaT8B1dRvRwr05+Jw9B3Y6 MSa6mMb8ovGhJ9viXjJk/7OKGkTYgD5IJzJYEN1mGCGC9vxyo83L7ixO9hLvC1X0 DaDdBcS8DbPxv9qX2EBOzQ+mfCyEumAi8qMnagfeGqyrB6+rqDqPTabRcR31eMn/ 6Cdg4yNLqDmzjqpBQq6cNQJT4M9uwSX/zdfRchZQH8aeZP8zdRaqBpB114eQS9DW 6VSc5plDQJaC7ue+ZmyVXe9pArX5qbVjmFYu6Oi7A8dOwdAT8XT9NXTGfyWGQUUb 2wBDdHFpHbGESR0QBd3qaB+icyx85S6prR1F1lWo0uqBhx8MYxdHLhkqBlGuCrbh puZNAjqaDkRBz5bBOgxUH4beub2A7jBDJL8w5vModN0phgapZTsn4LmeCWA9SeDn oh9MiYois0aqjz4lmY+4CcC9C8Dmm3ydXY/wCPqsemhYJb8jZ1v5znVIiBHTN2E4 LQHv3myKN9WuO71i8pNe8J8K8ub6C9z3JcRSMXhSPve9PgEVljbUqUPOlleuB2gG 4jq5a4STw29SQmBuoNzXhd4kCqMzjlOo1V3KPw/poqIysn+WuZwPmxG7EbXaqXOt v/j/oMiIogiMOdBI5F1jpXtD/pRZJvLJ8sr43iq9ZrWziO3Uvwop9Re8i8Q6XW5v Cbi1XjWGrO3A7hjfH3WB =6nga -----END PGP SIGNATURE----- --DzFMwNuU1QL7hgxO-- -- 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/