From: Kay, A. M <all...@in...> - 2008-05-06 22:01:49
|
>> + >> +#define DEFAULT_DOMAIN_ADDRESS_WIDTH 48 >> + >> +struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev >> *dev); >> +struct dmar_domain * iommu_alloc_domain(struct intel_iommu *iommu); >> +void iommu_free_domain(struct dmar_domain *domain); >> +int domain_init(struct dmar_domain *domain, int guest_width); >> +int domain_context_mapping(struct dmar_domain *d, >> + struct pci_dev *pdev); >> +int domain_page_mapping(struct dmar_domain *domain, dma_addr_t iova, >> + u64 hpa, size_t size, int prot); >> +void detach_domain_for_dev(struct dmar_domain *domain, u8 bus, u8 >> devfn); >> +struct dmar_domain * find_domain(struct pci_dev *pdev); > >Please move these to a .h file and also prefix appropriate keywords: > >domain_context_mapping is confusing and since it's an intel >iommu-only thing, >use something like > >intel_iommu_domain_context_mapping > These functions currently are just direct calls into existing functions in drivers/pci/intel-iommu.c - hence the lack of more descriptive name in KVM environment. To get more relavant names in KVM environment, we can either create wrappers for these functions or using a iommu function table. Allen |