diff options
author | Jean Guyader <jean.guyader@eu.citrix.com> | 2011-11-18 13:43:26 +0000 |
---|---|---|
committer | Jean Guyader <jean.guyader@eu.citrix.com> | 2011-11-18 13:43:26 +0000 |
commit | cf95b2a9fd5aff18408e501c67203c095b1ddc1c (patch) | |
tree | b6d8a7e98d38b787297d9c886d4f1664bddacc9f /xen/include/xen/iommu.h | |
parent | e51e2e0e581b91a61835413c3bfa5b46426825f7 (diff) | |
download | xen-cf95b2a9fd5aff18408e501c67203c095b1ddc1c.tar.gz xen-cf95b2a9fd5aff18408e501c67203c095b1ddc1c.tar.bz2 xen-cf95b2a9fd5aff18408e501c67203c095b1ddc1c.zip |
iommu: Introduce per cpu flag (iommu_dont_flush_iotlb) to avoid unnecessary iotlb flush
Add cpu flag that will be checked by the iommu low level code
to skip iotlb flushes. iommu_iotlb_flush shall be called explicitly.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/iommu.h')
-rw-r--r-- | xen/include/xen/iommu.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 82d4cc4605..4f21e02818 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -164,4 +164,16 @@ int iommu_do_domctl(struct xen_domctl *, XEN_GUEST_HANDLE(xen_domctl_t)); void iommu_iotlb_flush(struct domain *d, unsigned long gfn, unsigned int page_count); void iommu_iotlb_flush_all(struct domain *d); +/* + * The purpose of the iommu_dont_flush_iotlb optional cpu flag is to + * avoid unecessary iotlb_flush in the low level IOMMU code. + * + * iommu_map_page/iommu_unmap_page must flush the iotlb but somethimes + * this operation can be really expensive. This flag will be set by the + * caller to notify the low level IOMMU code to avoid the iotlb flushes. + * iommu_iotlb_flush/iommu_iotlb_flush_all will be explicitly called by + * the caller. + */ +DECLARE_PER_CPU(bool_t, iommu_dont_flush_iotlb); + #endif /* _IOMMU_H_ */ |