From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] VT-d : changes to support KVM Date: Sat, 05 Jul 2008 13:55:00 +0300 Message-ID: <486F5304.4070307@qumranet.com> References: <1215012800-18550-1-git-send-email-benami@il.ibm.com> <1215012800-18550-2-git-send-email-benami@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: amit.shah@qumranet.com, kvm@vger.kernel.org, muli@il.ibm.com, weidong.han@intel.com, "Kay, Allen M" To: Ben-Ami Yassour Return-path: Received: from il.qumranet.com ([212.179.150.194]:50528 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbYGEKzE (ORCPT ); Sat, 5 Jul 2008 06:55:04 -0400 In-Reply-To: <1215012800-18550-2-git-send-email-benami@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Ben-Ami Yassour wrote: > From: Kay, Allen M > > This patch extends the VT-d driver to support KVM > > [Ben: fixed memory pinning] > > Signed-off-by: Kay, Allen M > Signed-off-by: Weidong Han > Signed-off-by: Ben-Ami Yassour > --- > drivers/pci/dmar.c | 4 +- > drivers/pci/intel-iommu.c | 117 ++++++++++++++- > drivers/pci/intel-iommu.h | 344 ------------------------------------------- > drivers/pci/iova.c | 2 +- > drivers/pci/iova.h | 52 ------- > include/linux/intel-iommu.h | 344 +++++++++++++++++++++++++++++++++++++++++++ > include/linux/iova.h | 52 +++++++ > 7 files changed, 512 insertions(+), 403 deletions(-) > delete mode 100644 drivers/pci/intel-iommu.h > delete mode 100644 drivers/pci/iova.h > create mode 100644 include/linux/intel-iommu.h > create mode 100644 include/linux/iova.h > Please use the git diff '-M' flag (or set the 'diff.renames' config variable) so rename patches are reviewable. > > +void kvm_intel_iommu_domain_exit(struct dmar_domain *domain) > +{ > + u64 end; > + > + /* Domain 0 is reserved, so dont process it */ > + if (!domain) > + return; > + > + end = DOMAIN_MAX_ADDR(domain->gaw); > + end = end & (~PAGE_MASK_4K); > + > + /* clear ptes */ > + dma_pte_clear_range(domain, 0, end); > + > + /* free page tables */ > + dma_pte_free_pagetable(domain, 0, end); > + > + iommu_free_domain(domain); > + free_domain_mem(domain); > +} > +EXPORT_SYMBOL_GPL(kvm_intel_iommu_domain_exit); > I don't understand why the names are prefixed with 'kvm_'. These are not kvm functions. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.