[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] Allow the setting of the RMA size from XM scripts
# HG changeset patch # User Jimi Xenidis <jimix@xxxxxxxxxxxxxx> # Node ID 88f394c082fc543e7826b880ac5b9694b3b94559 # Parent 5979ad294b645d828ad3069cfed65c33b5292610 [POWERPC][TOOLS] Allow the setting of the RMA size from XM scripts This patch add a new XM "variable" called "powerpc_rma_log" with is the log2 size of Real Mode Area for a guest. Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx> --- tools/python/xen/xend/FlatDeviceTree.py | 2 +- tools/python/xen/xend/XendDomainInfo.py | 16 +++++++++++++--- tools/python/xen/xm/create.py | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff -r 5979ad294b64 -r 88f394c082fc tools/python/xen/xend/FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Fri Sep 15 12:56:21 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Fri Sep 15 13:03:27 2006 -0400 @@ -290,7 +290,7 @@ def build(imghandler): # add memory nodes totalmem = imghandler.vm.getMemoryTarget() * 1024 - rma_log = imghandler.vm.info.get('rma_log') + rma_log = imghandler.vm.info.get('powerpc_rma_log') rma_bytes = 1 << rma_log # RMA node diff -r 5979ad294b64 -r 88f394c082fc tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri Sep 15 12:56:21 2006 -0400 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Sep 15 13:03:27 2006 -0400 @@ -132,6 +132,7 @@ ROUNDTRIPPING_CONFIG_ENTRIES = [ ('vcpu_avail', int), ('cpu_weight', float), ('memory', int), + ('powerpc_rma_log', int), ('shadow_memory', int), ('maxmem', int), ('bootloader', str), @@ -152,6 +153,7 @@ VM_STORE_ENTRIES = [ ('vcpus', int), ('vcpu_avail', int), ('memory', int), + ('powerpc_rma_log', int), ('shadow_memory', int), ('maxmem', int), ('start_time', float), @@ -575,6 +577,7 @@ class XendDomainInfo: defaultInfo('vcpu_avail', lambda: (1 << self.info['vcpus']) - 1) defaultInfo('memory', lambda: 0) + defaultInfo('powerpc_rma_log', lambda: 0) defaultInfo('shadow_memory', lambda: 0) defaultInfo('maxmem', lambda: 0) defaultInfo('bootloader', lambda: None) @@ -1755,9 +1758,16 @@ class XendDomainInfoPPC(XendDomainInfo): shadow_cur = xc.shadow_mem_control(self.domid, shadow_mb) self.info['shadow_memory'] = shadow_cur - # use smallest RMA size available - rma_log = self.getRealModeLogs()[0] - self.info['rma_log'] = rma_log # store info for FlatDeviceTree + rma_log = self.info['powerpc_rma_log'] + if rma_log == 0: + # use smallest RMA size available + rma_log = self.getRealModeLogs()[0] + + if rma_log not in self.getRealModeLogs(): + raise ValueError("rma_log(%d) must be one of" % rma_log, + self.getRealModeLogs()) + + self.info['powerpc_rma_log'] = rma_log # store info for FlatDeviceTree rma_kb = (1 << rma_log) / 1024 if mem_kb < rma_kb: diff -r 5979ad294b64 -r 88f394c082fc tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Fri Sep 15 12:56:21 2006 -0400 +++ b/tools/python/xen/xm/create.py Fri Sep 15 13:03:27 2006 -0400 @@ -157,6 +157,10 @@ gopts.var('maxmem', val='MEMORY', gopts.var('maxmem', val='MEMORY', fn=set_int, default=None, use="Maximum domain memory in MB.") + +gopts.var('powerpc_rma_log', val='MEMORY', + fn=set_int, default=0, + use="Log2 size of the PowerPC Real Mode Area.") gopts.var('shadow_memory', val='MEMORY', fn=set_int, default=0, @@ -672,7 +676,7 @@ def make_config(vals): map(add_conf, ['name', 'memory', 'maxmem', 'shadow_memory', 'restart', 'on_poweroff', 'on_reboot', 'on_crash', - 'vcpus', 'features']) + 'vcpus', 'features', 'powerpc_rma_log']) if vals.uuid is not None: config.append(['uuid', vals.uuid]) _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |