From: "Jan Beulich" Subject: Re: [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used Date: Wed, 10 Jun 2015 07:17:31 +0100 Message-ID: <5577F29B0200007800082DF1@mail.emea.novell.com> References: <1431076038-7497-1-git-send-email-feng.wu@intel.com> <1431076038-7497-8-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: <1431076038-7497-8-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 08.05.15 at 11:07, wrote: > +static inline void setup_posted_irte( > + struct iremap_entry *new_ire, struct pi_desc *pi_desc, uint8_t gvec) > +{ > + new_ire->post.urg = 0; > + new_ire->post.vector = gvec; > + new_ire->post.pda_l = (((u64)virt_to_maddr(pi_desc)) >> > + (32 - PDA_LOW_BIT)) & PDA_MASK(LOW); > + new_ire->post.pda_h = (((u64)virt_to_maddr(pi_desc)) >> 32) & > + PDA_MASK(HIGH); Looking at this another time I can't see what the and-ing with PAD_MASK() is supposed to be good for. Nor can I see the need for the u64 casts. The two literal 32-s aren't ideal either, but I guess tolerable. Jan