From: Amit Shah Subject: Re: [PATCH 2/2] KVM: Device assignemnt with VT-d Date: Sat, 23 Aug 2008 15:13:19 +0530 Message-ID: <200808231513.19684.amit.shah@qumranet.com> References: <1218118487-7657-1-git-send-email-benami@il.ibm.com> <200808231427.42578.amit.shah@qumranet.com> <48AFD852.8040604@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Ben-Ami Yassour , kvm@vger.kernel.org, Muli Ben-Yehuda , weidong.han@intel.com, "Kay, Allen M" To: Avi Kivity Return-path: Received: from mis011-2.exch011.intermedia.net ([64.78.17.183]:46225 "EHLO mis011-2.exch011.intermedia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbYHWJoQ (ORCPT ); Sat, 23 Aug 2008 05:44:16 -0400 In-Reply-To: <48AFD852.8040604@qumranet.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: * On Saturday 23 Aug 2008 14:58:50 Avi Kivity wrote: > Amit Shah wrote: > > Also, is KVM_CAP_foo needed for this? This is the only #define that'll be > > used and we can simply do something like > > > > #ifdef KVM_DEV_ASSIGN_USE_VTD > > flags |= KVM_DEV_ASSIGN_USE_VTD > > #endif > > > > ? > > That only detects if the headers have the flag, not if the kernel > actually supports it (and whether there is an iommu in the host). We > need run-time detection. Which means we expose KVM_CAP_IOMMU only if one was detected? How to do this correctly?