From: Simon Horman Subject: Re: Re: [PATCH] Fix xm pci-attach/detach for inactivemanaged domains Date: Sun, 17 May 2009 18:15:55 +1000 Message-ID: <20090517081545.GA8335@verge.net.au> References: <5CC9D493E098B9kanno.masaki@jp.fujitsu.com> <20090515003015.GA23201@verge.net.au> <5EC9D52AF92FAAkanno.masaki@jp.fujitsu.com> <20090515163430.GD6696@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20090515163430.GD6696@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Masaki Kanno Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Sat, May 16, 2009 at 02:34:30AM +1000, Simon Horman wrote: > On Fri, May 15, 2009 at 04:01:30PM +0900, Masaki Kanno wrote: > Content-Description: Mail message body > > Hi Simon, > > > > Thanks for your review and test. > > > > >In the case of pci-attach if I follow the folliwing steps: > > > > > >$ xm new hvm.conf > > >$ xm pci-attach hvm 00:1a.0 > > >$ xm start hvm > > >[ wait a bit ] > > >$ xm pci-list hvm > > > > > >Then pci-list never indicates that 00:1a.0 has been assigned a vslot. > > > > Maybe, the domain start failed. > > Are there the following messages in a qemu-dm-hvm.log file? > > > > register_real_device: Assigning real physical device 00:1a.0 ... > > register_real_device: Error: no free virtual PCI slot > > pt_init: Error: Registration failed (00:1a.0) > > Error: Initialization failed for pass-through devices > > > > If so, the problem is solved by new patches. > > Could you review and test the patches? > > Yes, I cam to the same conclusion. > Though my solution was a little different. > > I think that the change below be an alternate solution > to both of your patches. Though there is still a problem > that the assigned vslot isn't reported by pci-list if > a function is attached while the domain isn't running. > > I will review your patches once I have had some sleep. > In the mean time, here is the change that have been thinking about. Hi Kano-san, it turns out that my idea doesn't work so well :-( But your patches seem to work for all the cases that I can dream up relating to starting and destroying domains while attaching and detaching pci devices. Acked-by: Simon Horman