From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Shah Subject: Re: Remaining passthrough/VT-d tasks list Date: Wed, 24 Sep 2008 15:26:08 +0530 Message-ID: <200809241526.08156.amit.shah@redhat.com> References: <0122C7C995D32147B66BF4F440D3016301C49E61@pdsmsx415.ccr.corp.intel.com> <200809241332.02833.amit.shah@redhat.com> <0122C7C995D32147B66BF4F440D3016301C4A061@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: "Yang, Sheng" , kvm@vger.kernel.org, "Avi Kivity" , benami@il.ibm.com, muli@il.ibm.com, "Kay, Allen M" , "Zhang, Xiantao" To: "Han, Weidong" Return-path: Received: from mx1.redhat.com ([66.187.233.31]:42443 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbYIXJ7I (ORCPT ); Wed, 24 Sep 2008 05:59:08 -0400 In-Reply-To: <0122C7C995D32147B66BF4F440D3016301C4A061@pdsmsx415.ccr.corp.intel.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: * On Wednesday 24 Sep 2008 14:08:14 Han, Weidong wrote: > Amit Shah wrote: > > * On Wednesday 24 Sep 2008 13:21:25 Han, Weidong wrote: > >> Amit Shah wrote: > >>>> - Add dummy driver to hide/unbind passthrough device from > >>>> host kernel > >>> > >>> This isn't needed; we currently don't assign the device to the guest > >>> if we find that a driver is already loaded. I intend to change it to > >>> failing guest start altogether in case we find a module already > >>> using a device. When a guest exits, we release all the structures > >>> and hence even unloading kvm is not needed to reclaim the device on > >>> the host side. > >> > >> This task needn't targe 2.6.28. For long term, we need it to make > >> device assignment more user friendly. > > > > How is the current scheme not user friendly? Or, how will adding a > > "dummy driver" be more user friendly? > > We had some discussion on this few months ago. Currently, users need to > remove device driver before assignment. If there are more than one same > type devices, removing driver makes them cannot work at the same time, > even though user just want to assign one of them to guest. Note that not > all drivers support unbind function. If we can provide a mechanism to > hide single device independently, e.g, implement a dummy driver to own > devices that user want to assign to guest. I think it's more friendly to > end user than remove/unbind driver manually. This needs a change in the driver core and it definitely won't be solved by having a dummy device. We have to have a way to signal to modules that a particular device will now be owned by a different module, even if the current module thinks it is the sole owner.