From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Wray Subject: Re: VMX device models not getting created anymore? Date: Mon, 20 Jun 2005 11:52:13 +0100 Message-ID: <42B69FDD.4010108@hp.com> References: <42B03B76.7010701@hp.com> <42B060BA.3020404@intel.com> <42B13EC8.3090008@hp.com> <42B1B86D.6090503@intel.com> <42B2CB0B.1000502@hp.com> <42B3246E.3000706@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <42B3246E.3000706@intel.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: Arun Sharma Cc: Ian Pratt , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Arun Sharma wrote: > Mike Wray wrote: > >> Compared to which field is it off by 1? >> The VMX code creates its own event channel using >> channel.eventChannel(), which will >> allocate new ports. Possibly it should be reusing the existing control >> channel port >> instead? This might account for the off-by-one as ports are allocated >> sequentially. > > > That seems to be the problem. If I add some logging, I see: > > [2005-06-17 12:06:07 xend] INFO (channel:32) created event channel: > > [2005-06-17 12:06:07 xend] INFO (channel:32) created event channel: > > > The first one is created here: > > File "/usr/lib/python/xen/xend/XendDomain.py", line 276, in domain_create > dominfo = XendDomainInfo.create(self.dbmap, config) > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 159, in create > vm.construct(config) > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 501, in construct > self.construct_image() > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 547, in > construct_image > self.create_channel() > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 680, in > create_channel > self.store_channel = self.eventChannel("store_channel") > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 674, in > eventChannel > return EventChannel.restoreFromDB(db, 0, self.id) > File "/usr/lib/python/xen/xend/server/channel.py", line 59, in > restoreFromDB > evtchn = cls.interdomain(dom1, dom2, port1=port1, port2=port2) > > The second is created here: > > File "/usr/lib/python/xen/xend/XendDomain.py", line 276, in domain_create > dominfo = XendDomainInfo.create(self.dbmap, config) > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 159, in create > vm.construct(config) > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 502, in construct > self.configure() > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 884, in configure > self.create_devices() > File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 704, in > create_devices > self.image.createDeviceModel() > File "/usr/lib/python/xen/xend/image.py", line 300, in createDeviceModel > self.device_channel = channel.eventChannel(0, self.vm.getDomain()) > File "/usr/lib/python/xen/xend/server/channel.py", line 116, in > eventChannel > return EventChannel.interdomain(dom1, dom2, port1=port1, port2=port2) > > Things get more interesting, because self.device_channel['port1'] for > the second channel returns 19 instead of 20. > > Are there assumptions in the code that there must be only one > interdomain event channel between two domains? It depends which code you are talking about. The code using the domain control channel (i.e. the frontend and backend drivers) gets upset if you don't use the first event channel on the domain. Other code will use any interdomin channel, but you need to tell it the port number somehow. Mike