[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] IOMMU: move inclusion point of asm/iommu.h
commit cb8252bf4743ad08bb40d69ff25810defa84fd0f Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Nov 15 13:32:47 2018 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Nov 15 13:32:47 2018 +0100 IOMMU: move inclusion point of asm/iommu.h In preparation of allowing inline functions in asm/iommu.h to de-reference struct struct iommu_ops, move the inclusion downwards past the declaration of that structure. This in turn requires moving the struct domain_iommu declaration, as it requires struct arch_iommu to be fully declared beforehand. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxx> --- xen/include/xen/iommu.h | 75 +++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index c75333c077..5ba0904b88 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -28,7 +28,6 @@ #include <public/hvm/ioreq.h> #include <public/domctl.h> #include <asm/device.h> -#include <asm/iommu.h> TYPE_SAFE(uint64_t, dfn); #define PRI_dfn PRIx64 @@ -103,42 +102,6 @@ enum iommu_feature bool_t iommu_has_feature(struct domain *d, enum iommu_feature feature); -enum iommu_status -{ - IOMMU_STATUS_disabled, - IOMMU_STATUS_initializing, - IOMMU_STATUS_initialized -}; - -struct domain_iommu { - struct arch_iommu arch; - - /* iommu_ops */ - const struct iommu_ops *platform_ops; - -#ifdef CONFIG_HAS_DEVICE_TREE - /* List of DT devices assigned to this domain */ - struct list_head dt_devices; -#endif - - /* Features supported by the IOMMU */ - DECLARE_BITMAP(features, IOMMU_FEAT_count); - - /* Status of guest IOMMU mappings */ - enum iommu_status status; - - /* - * Does the guest reqire mappings to be synchonized, to maintain - * the default dfn == pfn map. (See comment on dfn at the top of - * include/xen/mm.h). - */ - bool need_sync; -}; - -#define dom_iommu(d) (&(d)->iommu) -#define iommu_set_feature(d, f) set_bit(f, dom_iommu(d)->features) -#define iommu_clear_feature(d, f) clear_bit(f, dom_iommu(d)->features) - #ifdef CONFIG_HAS_PCI struct pirq; int hvm_do_IRQ_dpci(struct domain *, struct pirq *); @@ -230,6 +193,44 @@ struct iommu_ops { void (*dump_p2m_table)(struct domain *d); }; +#include <asm/iommu.h> + +enum iommu_status +{ + IOMMU_STATUS_disabled, + IOMMU_STATUS_initializing, + IOMMU_STATUS_initialized +}; + +struct domain_iommu { + struct arch_iommu arch; + + /* iommu_ops */ + const struct iommu_ops *platform_ops; + +#ifdef CONFIG_HAS_DEVICE_TREE + /* List of DT devices assigned to this domain */ + struct list_head dt_devices; +#endif + + /* Features supported by the IOMMU */ + DECLARE_BITMAP(features, IOMMU_FEAT_count); + + /* Status of guest IOMMU mappings */ + enum iommu_status status; + + /* + * Does the guest reqire mappings to be synchonized, to maintain + * the default dfn == pfn map. (See comment on dfn at the top of + * include/xen/mm.h). + */ + bool need_sync; +}; + +#define dom_iommu(d) (&(d)->iommu) +#define iommu_set_feature(d, f) set_bit(f, dom_iommu(d)->features) +#define iommu_clear_feature(d, f) clear_bit(f, dom_iommu(d)->features) + int __must_check iommu_suspend(void); void iommu_resume(void); void iommu_crash_shutdown(void); -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |