From: "Jan Beulich" Subject: Re: [v3 09/15] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts Date: Fri, 10 Jul 2015 14:27:37 +0100 Message-ID: <559FE469020000780008F88D@mail.emea.novell.com> References: <1435123109-10481-1-git-send-email-feng.wu@intel.com> <1435123109-10481-10-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435123109-10481-10-git-send-email-feng.wu@intel.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: Feng Wu Cc: kevin.tian@intel.com, keir@xen.org, george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 24.06.15 at 07:18, wrote: > --- a/xen/drivers/passthrough/vtd/iommu.h > +++ b/xen/drivers/passthrough/vtd/iommu.h > @@ -289,29 +289,43 @@ struct dma_pte { > /* interrupt remap entry */ > struct iremap_entry { > union { > - u64 lo_val; > + struct { u64 lo, hi; }; > struct { > - u64 p : 1, > + u16 p : 1, > fpd : 1, > dm : 1, > rh : 1, > tm : 1, > dlm : 3, > avail : 4, > - res_1 : 4, > - vector : 8, > - res_2 : 8, > - dst : 32; > - }lo; > - }; > - union { > - u64 hi_val; > + res_1 : 4; > + u8 vector; > + u8 res_2; > + u32 dst; > + u16 sid; > + u16 sq : 2, > + svt : 2, > + res_3 : 12; > + u32 res_4 : 32; > + } remap; > struct { > - u64 sid : 16, > - sq : 2, > + u16 p : 1, > + fpd : 1, > + res_1 : 6, > + avail : 4, > + res_2 : 2, > + urg : 1, > + im : 1; > + u8 vector; > + u8 res_3; > + u32 res_4 : 6, > + pda_l : 26; > + u16 sid; > + u16 sq : 2, > svt : 2, > - res_1 : 44; > - }hi; > + res_5 : 12; > + u32 pda_h; > + } post; > }; > }; Considering that various of the fields are identical between the two formats I wonder whether that shouldn't be presented in the layout here: sid, svt, sq, vector could all be a single structure field, with other parts becoming sub-unions. Or would that cause problems elsewhere? Jan