From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [RFC] [VTD][patch 3/3] vt-d support for pci passthrough: kvm-intel-iommu.patch Date: Tue, 06 May 2008 19:34:18 -0500 Message-ID: <4820F90A.4060706@codemonkey.ws> References: <1FE6DD409037234FAB833C420AA843EC01438CB6@orsmsx424.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Chris Wright , Avi Kivity , Ben-Ami Yassour1 To: "Kay, Allen M" Return-path: In-Reply-To: <1FE6DD409037234FAB833C420AA843EC01438CB6@orsmsx424.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Kay, Allen M wrote: > Intel-iommu driver changes for kvm vt-d support. Important changes are > in intel-iommu.c. The rest of the changes are for moving intel-iommu.h > and iova.h from drivers/pci directory to include/linux directory. > > Signed-off-by: Allen M Kay > > ---- > > b/drivers/pci/dmar.c | 4 > b/drivers/pci/intel-iommu.c | 26 ++- > b/drivers/pci/iova.c | 2 > b/include/linux/intel-iommu.h | 344 > ++++++++++++++++++++++++++++++++++++++++++ > b/include/linux/iova.h | 52 ++++++ > drivers/pci/intel-iommu.h | 344 > ------------------------------------------ > drivers/pci/iova.h | 52 ------ > 7 files changed, 416 insertions(+), 408 deletions(-) > > ---- > > diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c > index f941f60..a58a5b0 100644 > --- a/drivers/pci/dmar.c > +++ b/drivers/pci/dmar.c > @@ -26,8 +26,8 @@ > > #include > #include > -#include "iova.h" > -#include "intel-iommu.h" > +#include > +#include > > #undef PREFIX > #define PREFIX "DMAR:" > diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c > index 4cb949f..bfa888b 100644 > --- a/drivers/pci/intel-iommu.c > +++ b/drivers/pci/intel-iommu.c > @@ -31,8 +31,8 @@ > #include > #include > #include > -#include "iova.h" > -#include "intel-iommu.h" > +#include > +#include > #include /* force_iommu in this header in x86-64*/ > #include > #include > @@ -1056,7 +1056,7 @@ static void free_iommu(struct intel_iommu *iommu) > kfree(iommu); > } > > -static struct dmar_domain * iommu_alloc_domain(struct intel_iommu > *iommu) > +struct dmar_domain * iommu_alloc_domain(struct intel_iommu *iommu) > { > unsigned long num; > unsigned long ndomains; > @@ -1086,8 +1086,9 @@ static struct dmar_domain * > iommu_alloc_domain(struct intel_iommu *iommu) > > return domain; > } > +EXPORT_SYMBOL_GPL(iommu_alloc_domain); > > -static void iommu_free_domain(struct dmar_domain *domain) > +void iommu_free_domain(struct dmar_domain *domain) > { > unsigned long flags; > > @@ -1095,6 +1096,7 @@ static void iommu_free_domain(struct dmar_domain > *domain) > clear_bit(domain->id, domain->iommu->domain_ids); > spin_unlock_irqrestore(&domain->iommu->lock, flags); > } > +EXPORT_SYMBOL_GPL(iommu_free_domain); > > static struct iova_domain reserved_iova_list; > static struct lock_class_key reserved_alloc_key; > @@ -1160,7 +1162,7 @@ static inline int guestwidth_to_adjustwidth(int > gaw) > return agaw; > } > > -static int domain_init(struct dmar_domain *domain, int guest_width) > +int domain_init(struct dmar_domain *domain, int guest_width) > { > I think it's already been mentioned, but these are pretty terrible names if you're exporting these symbols. Linux supports other IOMMUs so VT-d should not be hogging the iommu_* namespace. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone