From: "Jan Beulich" Subject: Re: [RFC v2 06/15] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts Date: Tue, 16 Jun 2015 08:48:53 +0100 Message-ID: <557FF1050200007800085434@mail.emea.novell.com> References: <1431076038-7497-1-git-send-email-feng.wu@intel.com> <1431076038-7497-7-git-send-email-feng.wu@intel.com> <557713700200007800082B23@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Feng Wu Cc: Kevin Tian , "keir@xen.org" , "george.dunlap@eu.citrix.com" , "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" , Yang Z Zhang List-Id: xen-devel@lists.xenproject.org >>> On 16.06.15 at 08:18, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> Sent: Tuesday, June 09, 2015 10:25 PM >> >>> On 08.05.15 at 11:07, wrote: >> > @@ -302,16 +302,28 @@ struct iremap_entry { >> > vector : 8, >> > res_2 : 8, >> > dst : 32; >> > - }lo; >> > - }; >> > - union { >> > - u64 hi_val; >> > + u64 sid : 16, >> > + sq : 2, >> > + svt : 2, >> > + res_3 : 44; > > For this, are we worth using u32 for this one? > > u32 sid: 16, > sq: 2, > svt: 2, > res_3: 12; > u32 res_4; > > >> > + }remap; >> > struct { >> > + u64 p : 1, >> > + fpd : 1, >> > + res_1 : 6, >> > + avail : 4, >> > + res_2 : 2, >> > + urg : 1, >> > + im : 1, >> > + vector : 8, >> > + res_3 : 14, >> > + pda_l : 26; > > Also this one? > > ... > res_3: 8 > u32 res_4: 6, > pda_l: 26; > > >> > u64 sid : 16, >> > sq : 2, >> > svt : 2, >> > - res_1 : 44; > > This one? Yes in all three case, subject to ... >> > - }hi; >> > + res_4 : 12, >> > + pda_h : 32; >> > + }post; >> > }; >> > }; >> >> Same here - unless the VT-d maintainers disagree, I think using u32 >> wherever possible would be preferable over using u64, as well as >> avoiding bitfields for members filling an entire word. ... the maintainers' not disagreeing. Jan