From: Tim Deegan Subject: Re: [Patch RFC 00/13] VT-d Asynchronous Device-TLB Flush for ATS Device Date: Tue, 13 Oct 2015 10:34:42 +0100 Message-ID: <20151013093442.GA11401@deinos.phlegethon.org> References: <1442409847-65383-1-git-send-email-quan.xu@intel.com> <945CA011AD5F084CBEA3E851C0AB28894029E71C@SHSMSX101.ccr.corp.intel.com> <20150923162647.GA91198@deinos.phlegethon.org> <945CA011AD5F084CBEA3E851C0AB2889402A4BF2@SHSMSX101.ccr.corp.intel.com> <20150929091149.GB69384@deinos.phlegethon.org> <945CA011AD5F084CBEA3E851C0AB2889402A8083@SHSMSX101.ccr.corp.intel.com> <20151001090916.GA73453@deinos.phlegethon.org> <945CA011AD5F084CBEA3E851C0AB28894A469DFE@SHSMSX101.ccr.corp.intel.com> <20151010182450.GA43730@deinos.phlegethon.org> <945CA011AD5F084CBEA3E851C0AB28894A476EEE@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <945CA011AD5F084CBEA3E851C0AB28894A476EEE@SHSMSX101.ccr.corp.intel.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: "Xu, Quan" Cc: "Nakajima, Jun" , "Tian, Kevin" , "keir@xen.org" , "ian.campbell@citrix.com" , "george.dunlap@eu.citrix.com" , "andrew.cooper3@citrix.com" , "Dong, Eddie" , "xen-devel@lists.xen.org" , "jbeulich@suse.com" , "Zhang, Yang Z" List-Id: xen-devel@lists.xenproject.org Hi, At 11:09 +0000 on 11 Oct (1444561760), Xu, Quan wrote: > One question: do two lists refer to page_list and arch.relmem_list? No, I was wondering if a page ever needed to be queued waiting for two different flushes -- e.g. if there are multiple IOMMUs. > I know you prefer __scheme_A__(I think Jan prefers __scheme_A__ too. Jan, correct me, if I am wrong :) ) > which fits better with the usual way refcounts are used. But __scheme_A__ would be difficult for buy-in by my team (Obviously, why spend so many effort for such a small issue? why does __scheme_B__ not accept?) I think, __scheme_A__ is also a tricky solution. > What in particular is worrying you about scheme A? AFAICS you need to build the same refcount-taking mechanism for either scheme. Is it the interactions with other p2m-based features in VMs that don't have devices passed through? In that case perhaps you could just mandate that ATS support means no shared HAP/IOMMU tables, and do the refcounting only in the IOMMU ones? > I think __scheme_A__ is complex to keep a log of all relevant pending derefs, and to be processed when the flush completes; > > optimized __scheme_A__: > It could keep a log of the reference only when the IOMMU entry is _ removed/overwritten_.(if the IOMMU entry is not _ removed/overwritten_, it is safe.). Yes, though I'd add any change from read-write to read-only. Basically, you only need the log/deref whenever you need to flush the IOMMU. :) Cheers, Tim.