From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: PCIPT: VT-d support Date: Thu, 10 Jul 2008 17:57:56 +0300 Message-ID: <48762374.3000002@qumranet.com> References: <1215681282-3449-1-git-send-email-benami@il.ibm.com> <200807101730.26586.sheng.yang@intel.com> <1215683513.31546.175.camel@cluwyn.haifa.ibm.com> <200807101807.28719.sheng.yang@intel.com> <20080710144124.GD7273@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Yang, Sheng" , Ben-Ami Yassour1 , kvm@vger.kernel.org, amit.shah@qumranet.com, weidong.han@intel.com, anthony@codemonkey.ws, "Kay, Allen M" To: Muli Ben-Yehuda Return-path: Received: from il.qumranet.com ([212.179.150.194]:40673 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755890AbYGJO55 (ORCPT ); Thu, 10 Jul 2008 10:57:57 -0400 In-Reply-To: <20080710144124.GD7273@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Muli Ben-Yehuda wrote: > On Thu, Jul 10, 2008 at 06:07:27PM +0800, Yang, Sheng wrote: > > >> I think it's may be unnecessary to map pages when device >> assigned. The table can be set up along with set_memory_region(), it >> covered all memory slots already, or I miss something here? >> > > VT-d is only initialized after the slots are originally created, so > when VT-d is initialized is map all of the existing slots separately, > and then for each new slot that may be added we'll catch it via > set_memory_region(). > It makes sense to initialize VT-d before. Since memslots can be created and destroyed dynamically, with the current implementation we can see create slot create slot init VT-d create slot which means we need to support both slot-creation-after-VT-d and init-VT-d-after-slot-creation. If we initialize VT-d up front, we only need to support (and test) one scenario. On the other hand, this means that you will not be able to assign devices unless you specified this when creating the VM; but I think this is fair. -- error compiling committee.c: too many arguments to function