WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] VMX device models not getting created anymore?

To: Mike Wray <mike.wray@xxxxxx>
Subject: Re: [Xen-devel] VMX device models not getting created anymore?
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Fri, 17 Jun 2005 12:28:46 -0700
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 17 Jun 2005 19:27:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <42B2CB0B.1000502@xxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D2821A6@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <42B03B76.7010701@xxxxxx> <42B060BA.3020404@xxxxxxxxx> <42B13EC8.3090008@xxxxxx> <42B1B86D.6090503@xxxxxxxxx> <42B2CB0B.1000502@xxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
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: <EventChannel dom1:0:19 dom2:5:2> [2005-06-17 12:06:07 xend] INFO (channel:32) created event channel: <EventChannel dom1:0:20 dom2:5:3>

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?

        -Arun

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel