From: Simon Horman Subject: Re: [patch] [xm, xend] passthrough: Add assigned_or_requested_vslot() Date: Tue, 26 May 2009 18:41:58 +1000 Message-ID: <20090526084158.GA27216@verge.net.au> References: <20090526063342.GA7824@verge.net.au> <74C9DDD2F3997Bkanno.masaki@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <74C9DDD2F3997Bkanno.masaki@jp.fujitsu.com> 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 Tue, May 26, 2009 at 04:24:05PM +0900, Masaki Kanno wrote: > Hi Simon, > > Great!! Your patch is of importance. > If without your patch, we cannot start domains. I found a problem > about starting domains. The reproduction operations of the problem > are as follows. > > Step to Reproduce: > 1. xm start > 2. xm pci-attach **:**.* * > 3. Shutdown guest OS on > 4. xm start ---> fail > > Your patch has solved the problem. Great! > Trivial comment: > The following line includes Tab indent. Sorry, I will fix that and repost. > Index: xen-unstable.hg/tools/python/xen/xm/main.py > =================================================================== > --- xen-unstable.hg.orig/tools/python/xen/xm/main.py 2009-05-26 14: > 37:15.000000000 +1000 > +++ xen-unstable.hg/tools/python/xen/xm/main.py 2009-05-26 14:38:36. > 000000000 +1000 > @@ -2167,18 +2167,12 @@ def xm_pci_list(args): > > has_vslot = False > for x in devs: > - if x.has_key('vslot'): > - if x['vslot'] == "0x%s" % AUTO_PHP_SLOT_STR: > - x['vslot'] = '-' > - else: > - has_vslot = True > - elif not x.has_key('requested_vslot'): > - x['vslot'] = '-' > - elif x['requested_vslot'] == "0x%s" % AUTO_PHP_SLOT_STR: > + vslot = assigned_or_requested_vslot(x) <------------ here!! > + if int(vslot, 16) == AUTO_PHP_SLOT: > x['vslot'] = '-' > else: > + x['vslot'] = vslot > has_vslot = True > - x['vslot'] = x['requested_vslot'] > > if has_vslot: > hdr_str = 'VSlt domain bus slot func'