[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52766EB0B99F292DED0C10588CF2A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Mon, 11 Sep 2023 06:06:35 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Stefan Hajnoczi <stefanha@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: David Laight <David.Laight@...LAB.COM>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Jason Gunthorpe <jgg@...dia.com>
Subject: RE: [PATCH v2 1/3] vfio: trivially use __aligned_u64 for ioctl
structs
> From: Stefan Hajnoczi <stefanha@...hat.com>
> Sent: Wednesday, August 30, 2023 2:27 AM
>
> u64 alignment behaves differently depending on the architecture and so
> <uapi/linux/types.h> offers __aligned_u64 to achieve consistent behavior
> in kernel<->userspace ABIs.
>
> There are structs in <uapi/linux/vfio.h> that can trivially be updated
> to __aligned_u64 because the struct sizes are multiples of 8 bytes.
> There is no change in memory layout on any CPU architecture and
> therefore this change is safe.
>
> The commits that follow this one handle the trickier cases where
> explanation about ABI breakage is necessary.
>
> Suggested-by: Jason Gunthorpe <jgg@...dia.com>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@...hat.com>
Reviewed-by: Kevin Tian <kevin.tian@...el.com>
Powered by blists - more mailing lists