From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v5 11/17] vt-d: Add API to update IRTE when VT-d PI is used Date: Thu, 13 Aug 2015 14:27:59 -0400 Message-ID: <20150813182759.GA10770@x230.dumpdata.com> References: <1439346938-31824-1-git-send-email-feng.wu@intel.com> <1439346938-31824-12-git-send-email-feng.wu@intel.com> <20150812162302.GG17650@l.oracle.com> <55CC725F020000780009A7C6@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55CC725F020000780009A7C6@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Kevin Tian , Keir Fraser , Andrew Cooper , xen-devel@lists.xen.org, Yang Zhang , Feng Wu List-Id: xen-devel@lists.xenproject.org On Thu, Aug 13, 2015 at 02:33:03AM -0600, Jan Beulich wrote: > >>> On 12.08.15 at 18:23, wrote: > > On Wed, Aug 12, 2015 at 10:35:32AM +0800, Feng Wu wrote: > >> + GET_IREMAP_ENTRY(ir_ctrl->iremap_maddr, remap_index, iremap_entries, p); > >> + > >> + old_ire = new_ire = *p; > >> + > >> + /* Setup/Update interrupt remapping table entry. */ > >> + setup_posted_irte(&new_ire, pi_desc, gvec); > >> + ret = cmpxchg16b(p, &old_ire, &new_ire); > >> + > >> + ASSERT(ret == *(__uint128_t *)&old_ire); > >> + > >> + iommu_flush_cache_entry(p, sizeof(*p)); > > > > The other use sites of iommu_flush_cache_entry are sizeof(struct > > iremap_entry). > > I think if you are doing this modification - then you should also have an > > patch to modify the other code to be in sync. > > > > Or just use the sizeof(struct ...). > > I asked for this (to avoid proliferation of the bad style); I > certainly wouldn't mind another cleanup patch to deal with the > other use sites, but I certainly don't want to see this go back > to sizeof(struct ...). Aah, I missed that! Thank you. > > Jan >