From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [Patch RFC 08/13] vt-d: Held on the freed page until the Device-TLB flush is completed. Date: Wed, 16 Sep 2015 10:45:40 +0100 Message-ID: <55F93A44.9030803@citrix.com> References: <1442409847-65383-1-git-send-email-quan.xu@intel.com> <1442409847-65383-9-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442409847-65383-9-git-send-email-quan.xu@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: Quan Xu , andrew.cooper3@citrix.com, eddie.dong@intel.com, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, jun.nakajima@intel.com, keir@xen.org, kevin.tian@intel.com, tim@xen.org, yang.z.zhang@intel.com, george.dunlap@eu.citrix.com Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Quan, On 16/09/2015 14:24, Quan Xu wrote: > diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h > index e40fc7b..5dc0033 100644 > --- a/xen/include/xen/hvm/iommu.h > +++ b/xen/include/xen/hvm/iommu.h Same remarks as the previous patches for the fields, prototype and macros. > @@ -53,11 +53,15 @@ struct hvm_iommu { > struct qi_talbe talbe; > bool_t qi_flag; > > + struct page_list_head qi_hold_page_list; > + spinlock_t qi_lock; > + > /* Features supported by the IOMMU */ > DECLARE_BITMAP(features, IOMMU_FEAT_count); > }; > > void do_qi_flushing(struct domain *d); > +void qi_hold_page(struct domain *d, struct page_info *pg); > > #define iommu_set_feature(d, f) set_bit((f), domain_hvm_iommu(d)->features) > #define iommu_clear_feature(d, f) clear_bit((f), domain_hvm_iommu(d)->features) > @@ -68,5 +72,9 @@ void do_qi_flushing(struct domain *d); > (d->arch.hvm_domain.hvm_iommu.talbe.qi_table_poll_slot) > #define QI_FLUSHING(d) \ > (d->arch.hvm_domain.hvm_iommu.qi_flag) > +#define qi_hold_page_list(d) \ > + (d->arch.hvm_domain.hvm_iommu.qi_hold_page_list) > +#define qi_page_lock(d) \ > + (d->arch.hvm_domain.hvm_iommu.qi_lock) > > #endif /* __XEN_HVM_IOMMU_H__ */ > Regards, -- Julien Grall