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?

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: <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?

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


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