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-ia64-devel

[Xen-devel] architecture-specific stuff in xend

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: [Xen-devel] architecture-specific stuff in xend
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 08 Aug 2006 10:34:25 -0500
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 08 Aug 2006 08:34:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ewan, I'm almost ready to integrate some PPC-specific stuff into
xend, and I was wondering if you had a plan for how that should work.

First example: the device tree data structure we talked about a few
weeks ago. We will need to pass the config data to PPC code, probably in
XendDomainInfo.initDomain(), and then pass the resulting data structure
into libxc's xc_linux_load() somehow.

As another example, initDomain() already has some architecture hackage
in it for memory allocation. We think we'll need to modify that some
more in the future for PPC, possibly even changing the "order" argument
to xc.domain_memory_increase_reservation().

Rather than having these inline tests everywhere ("if os.uname()[4] in
('ia64', 'ppc64'):"), would it make more sense to have some sort of
"architecture" object, and do things like:
class Architecture:
        def init_reservation(self, mem_kb):
                return mem_kb
        def init_reservation_order(self):
                return 0
class ia64_Architecture(Architecture):
        def init_reservation(self, mem_kb):
                if 'hvm' in xc.xeninfo()['xen_caps']:
                        mem_kb += 4*1024;
                return mem_kb

Sample use in XendDomainInfo.py:
from xen.xend import arch
        ...
        init_reservation = arch.init_reservation(mem_kb)

I'm not sure how/where to instantiate the arch object though.

Does that make sense to you? The Architecture object would expand to
include every piece of arch-specific functionality we run across in the
future.

-- 
Hollis Blanchard
IBM Linux Technology Center


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