Subject: Re: I can finally restart xend.
To: Jed Davis <jdev@panix.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-xen
Date: 08/19/2005 15:11:04
On Wed, Aug 17, 2005 at 07:25:57PM -0400, Jed Davis wrote:
> [More or less this message is, hopefully, being appended to PR#30635.]
> 
> I have here a small patch to xend (for xen 2.0.6, but I don't think
> the affected code has been changed on that branch) that makes it
> behave itself; this is true whether or not the dom0 kernel is using
> the change I appended to the PR (whis is not quite the same as the one
> I sent here).  I don't know why this isn't an issue for all users of
> xend on other OSes, but apparently it's not.
> 
> --- tools/python/xen/xend/XendDomain.py.orig    2005-08-13 01:54:56.000000000 -0400
> +++ tools/python/xen/xend/XendDomain.py 2005-08-13 01:55:17.000000000 -0400
> @@ -147,7 +147,10 @@
>              domid = str(d['dom'])
>              doms[domid] = d
>          dlist = []
> -        for config in self.domain_db.values():
> +        domkeys = map(int, self.domain_db.keys())
> +        domkeys.sort()
> +        for domkey in domkeys:
> +            config = self.domain_db.get(str(domkey))
>              domid = str(sxp.child_value(config, 'id'))
>              if domid in doms:
>                  d_dom = self._new_domain(config, doms[domid])
> 
> I suspect that this is not the Right solution from the perspective of
> xend's architecture, which I do not understand, but it works.  I also
> don't pretend to know what the Right Thing to do with
> IOCTL_PRIVCMD_MMAP at this point is.

Hi,
thanks for the patch. With it I can properly restart xend too,
so I commited it to pkgsrc.
I don't understand python so I can't really say what the proper solution
would be, but what you says makes sense.

As for IOCTL_PRIVCMD_MMAP, I'll try to have a look in the next few days.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--