public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Kay, Allen M" <allen.m.kay@intel.com>
Cc: kvm-devel@lists.sourceforge.net, Chris Wright <chrisw@redhat.com>,
	Avi Kivity <avik@qumranet.com>,
	Ben-Ami Yassour1 <benami@il.ibm.com>
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	[thread overview]
Message-ID: <4820F90A.4060706@codemonkey.ws> (raw)
In-Reply-To: <1FE6DD409037234FAB833C420AA843EC01438CB6@orsmsx424.amr.corp.intel.com>

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 <allen.m.kay@intel.com>
>
> ----
>
>  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 <linux/pci.h>
>  #include <linux/dmar.h>
> -#include "iova.h"
> -#include "intel-iommu.h"
> +#include <linux/iova.h>
> +#include <linux/intel-iommu.h>
>  
>  #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 <linux/dmar.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/mempool.h>
> -#include "iova.h"
> -#include "intel-iommu.h"
> +#include <linux/iova.h>
> +#include <linux/intel-iommu.h>
>  #include <asm/proto.h> /* force_iommu in this header in x86-64*/
>  #include <asm/cacheflush.h>
>  #include <asm/gart.h>
> @@ -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

      reply	other threads:[~2008-05-07  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 21:37 [RFC] [VTD][patch 3/3] vt-d support for pci passthrough: kvm-intel-iommu.patch Kay, Allen M
2008-05-07  0:34 ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4820F90A.4060706@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=allen.m.kay@intel.com \
    --cc=avik@qumranet.com \
    --cc=benami@il.ibm.com \
    --cc=chrisw@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox