From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] KVM: Device assignemnt with VT-d Date: Wed, 13 Aug 2008 12:46:03 +0300 Message-ID: <48A2AD5B.6080409@qumranet.com> References: <1218118487-7657-1-git-send-email-benami@il.ibm.com> <1218118487-7657-2-git-send-email-benami@il.ibm.com> <200808131738.25940.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Ben-Ami Yassour , amit.shah@qumranet.com, muli@il.ibm.com, weidong.han@intel.com, "Kay, Allen M" To: "Yang, Sheng" Return-path: Received: from il.qumranet.com ([212.179.150.194]:14822 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbYHMJqF (ORCPT ); Wed, 13 Aug 2008 05:46:05 -0400 In-Reply-To: <200808131738.25940.sheng.yang@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Yang, Sheng wrote: > On Thursday 07 August 2008 22:14:47 Ben-Ami Yassour wrote: > >> Based on a patch by: Kay, Allen M >> >> This patch enables pci device assignment based on VT-d support. >> When a device is assigned to the guest, the guest memory is pinned >> and the mapping is updated in the VT-d IOMMU. >> >> > > I am afraid there still some compatible problem... > > >> Signed-off-by: Kay, Allen M >> Signed-off-by: Weidong Han >> Signed-off-by: Ben-Ami Yassour >> --- >> arch/x86/kvm/Makefile | 3 + >> arch/x86/kvm/vtd.c | 203 >> > [snip] > >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index a97157c..5cfc21a 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -35,6 +35,7 @@ >> #include >> #include >> #include >> +#include >> > > This broken external kernel modules before 2.6.27... If we wrapped it > with CONFIG_DMAR, it would also broken the commit before the patch > checked in and after DMAR enabled in kernel... Need a version number > judgement? > > kernel patches should not consider external module issues. That keeps the code clean (at the expense of making the external module's maintainer's life mode difficult, but that's their problem). >> diff --git a/include/asm-x86/kvm_host.h >> b/include/asm-x86/kvm_host.h index ef019b5..b141949 100644 >> --- a/include/asm-x86/kvm_host.h >> +++ b/include/asm-x86/kvm_host.h >> @@ -354,6 +354,7 @@ struct kvm_arch{ >> */ >> struct list_head active_mmu_pages; >> struct list_head assigned_dev_head; >> + struct dmar_domain *intel_iommu_domain; >> > > Need wrapped by CONFIG_DMAR? > > I guess we can keep this, one pointer is not that expensive. But we should make sure all the iommu functions are available when iommu is unconfigured. -- error compiling committee.c: too many arguments to function