From: "Jan Beulich" Subject: Re: [PATCHv1 6/6] evtchn: pad struct evtchn to 64 bytes Date: Wed, 10 Jun 2015 10:04:34 +0100 Message-ID: <557819C20200007800082EC9@mail.emea.novell.com> References: <1433861999-15771-1-git-send-email-david.vrabel@citrix.com> <1433861999-15771-7-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z2bw5-0003jF-3k for xen-devel@lists.xenproject.org; Wed, 10 Jun 2015 09:04:37 +0000 In-Reply-To: <1433861999-15771-7-git-send-email-david.vrabel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 09.06.15 at 16:59, wrote: > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -110,8 +110,8 @@ struct evtchn > u8 priority; > u8 last_priority; > u16 last_vcpu_id; > -#ifdef XSM_ENABLE > union { > +#ifdef XSM_ENABLE > #ifdef XSM_NEED_GENERIC_EVTCHN_SSID > /* > * If an XSM module needs more space for its event channel context, > @@ -127,8 +127,9 @@ struct evtchn > */ > u32 flask_sid; > #endif > - } ssid; > #endif > + u8 __pad[24]; /* Round size to power of two. */ The union in the middle differing in size between 32- and 64-bit architectures, can this really be a uniform value? Wouldn't it be better to simply mark the whole structured aligned(64)? Also I don't see the need for an underscore here, not to speak of even two of them. Jan