[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5cfa9ed2b8eee3622715a7c0c62b09461dea607c.camel@perches.com>
Date: Thu, 18 Oct 2018 10:20:10 -0700
From: Joe Perches <joe@...ches.com>
To: Wenwen Wang <wang6495@....edu>
Cc: Kangjie Lu <kjlu@....edu>,
Alex Williamson <alex.williamson@...hat.com>,
"open list:VFIO DRIVER" <kvm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/vfio: Fix an 8-byte alignment issue
On Wed, 2018-10-17 at 13:18 -0500, Wenwen Wang wrote:
> This patch adds a 4-byte reserved field in the structure
> vfio_eeh_pe_op to make sure that the u64 fields in the structure
> vfio_eeh_pe_err are 8-byte aligned.
>
> Signed-off-by: Wenwen Wang <wang6495@....edu>
> ---
> include/uapi/linux/vfio.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
> index 1aa7b82..3e71ded 100644
> --- a/include/uapi/linux/vfio.h
> +++ b/include/uapi/linux/vfio.h
> @@ -729,6 +729,7 @@ struct vfio_eeh_pe_op {
> __u32 argsz;
> __u32 flags;
> __u32 op;
> + __u32 __res;
> union {
> struct vfio_eeh_pe_err err;
> };
Why use an anonymous union for a single element?
Why not make struct vfio_eeh_pe_err __aligned(8)?
Why not make the u64 structure elements of
struct ufio_eeh_pe_err __aligned_u64?
Powered by blists - more mailing lists