Re: [XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values
Is this still an issue? Have you investigated more? -- Hollis Blanchard IBM Linux Technology Center On Wed, 2006-10-18 at 18:43 -0400, Maria Butrico wrote: I cannot successfully make a libos domain with 2212M (2G+64). I also cannot make one with 1024M.With 1024M the libos terminates, with 2212 it traps. There is no reason to believe that libos has code to handle any of that so this is not terribly surprising. What intrigues me is that the in 1024 case xen terminated the domain, or so it looks at first glance and in the second case it does as well.I doubt I can be quick enough to attach the debugger and see why it trapped. I tested on one of 8G JS21. (my libos is itself not necessarily in a stable state. I was working on something else.) The console output was illuminating (XEN) allocated RMA for Dom[1]: 0x2000[0x400] (XEN) Domain[1].0: initializing (XEN) allocated RMA for Dom[2]: 0x2000[0x400] (XEN) Domain[2].0: initializing (XEN) allocated RMA for Dom[3]: 0x2000[0x400] (XEN) Domain[3].0: initializing (XEN) allocated RMA for Dom[4]: 0x2000[0x400] (XEN) Domain[4].0: initializing (XEN) allocated RMA for Dom[5]: 0x2000[0x400] (XEN) Domain[5].0: initializing (XEN) allocated RMA for Dom[6]: 0x2000[0x400] (XEN) Domain[6].0: initializing :) There is nothing unusual in /var/xen ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values
# HG changeset patch # User Jimi Xenidis [EMAIL PROTECTED] # Node ID d18a0c0b77d7004631559d4e2f9d31744fe9b34a # Parent ece7037c72c6b7944ede2261ec1fe99c1489cff4 [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values When creating a 2G DomU pyhton chokes when it sees a long type. If a value is of type long, or promoted to long it should be packed as a quad. Signed-off-by: Jimi Xenidis [EMAIL PROTECTED] --- tools/python/xen/xend/FlatDeviceTree.py | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff -r ece7037c72c6 -r d18a0c0b77d7 tools/python/xen/xend/FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Wed Oct 18 11:29:57 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Wed Oct 18 16:07:33 2006 -0400 @@ -37,8 +37,10 @@ def _bincat(seq, separator=''): '''Concatenate the contents of seq into a bytestream.''' strs = [] for item in seq: -if type(item) == type(0): +if isinstance(item, int): strs.append(struct.pack(I, item)) +elif isinstance(item, long): +strs.append(struct.pack(Q, item)) else: try: strs.append(item.to_bin()) @@ -287,9 +289,9 @@ def build(imghandler): root.addprop('compatible', 'Momentum,Maple\0') xen = root.addnode('xen') -xen.addprop('start-info', 0, 0x3ffc000, 0, 0x1000) +xen.addprop('start-info', long(0x3ffc000), long(0x1000)) xen.addprop('version', 'Xen-3.0-unstable\0') -xen.addprop('reg', 0, imghandler.vm.domid, 0, 0) +xen.addprop('reg', long(imghandler.vm.domid), long(0)) xen.addprop('domain-name', imghandler.vm.getName() + '\0') xencons = xen.addnode('console') xencons.addprop('interrupts', 1, 0) @@ -301,14 +303,14 @@ def build(imghandler): # RMA node rma = root.addnode('[EMAIL PROTECTED]') -rma.addprop('reg', 0, 0, 0, rma_bytes) +rma.addprop('reg', long(0), long(rma_bytes)) rma.addprop('device_type', 'memory\0') # all the rest in a single node remaining = totalmem - rma_bytes if remaining 0: mem = root.addnode('[EMAIL PROTECTED]') -mem.addprop('reg', 0, rma_bytes, 0, remaining) +mem.addprop('reg', long(rma_bytes), long(remaining)) mem.addprop('device_type', 'memory\0') # add CPU nodes @@ -346,8 +348,8 @@ def build(imghandler): chosen.addprop('interrupt-controller', xen.get_phandle()) chosen.addprop('bootargs', imghandler.cmdline + '\0') # xc_linux_load.c will overwrite these 64-bit properties later -chosen.addprop('linux,initrd-start', 0, 0) -chosen.addprop('linux,initrd-end', 0, 0) +chosen.addprop('linux,initrd-start', long(0)) +chosen.addprop('linux,initrd-end', long(0)) if 1: f = file('/tmp/domU.dtb', 'w') ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values
The following changeset should fix the issue with DomU =2G where our python devtree code can only handle ints and math from a 2G value promotes the type to long which before this patch we could not encode. Please test on larger systems. -JX On Oct 18, 2006, at 4:20 PM, Xen patchbot-xenppc-unstable wrote: # HG changeset patch # User Jimi Xenidis [EMAIL PROTECTED] # Node ID d18a0c0b77d7004631559d4e2f9d31744fe9b34a # Parent ece7037c72c6b7944ede2261ec1fe99c1489cff4 [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values When creating a 2G DomU pyhton chokes when it sees a long type. If a value is of type long, or promoted to long it should be packed as a quad. Signed-off-by: Jimi Xenidis [EMAIL PROTECTED] --- tools/python/xen/xend/FlatDeviceTree.py | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff -r ece7037c72c6 -r d18a0c0b77d7 tools/python/xen/xend/ FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Wed Oct 18 11:29:57 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Wed Oct 18 16:07:33 2006 -0400 @@ -37,8 +37,10 @@ def _bincat(seq, separator=''): '''Concatenate the contents of seq into a bytestream.''' strs = [] for item in seq: -if type(item) == type(0): +if isinstance(item, int): strs.append(struct.pack(I, item)) +elif isinstance(item, long): +strs.append(struct.pack(Q, item)) else: try: strs.append(item.to_bin()) @@ -287,9 +289,9 @@ def build(imghandler): root.addprop('compatible', 'Momentum,Maple\0') xen = root.addnode('xen') -xen.addprop('start-info', 0, 0x3ffc000, 0, 0x1000) +xen.addprop('start-info', long(0x3ffc000), long(0x1000)) xen.addprop('version', 'Xen-3.0-unstable\0') -xen.addprop('reg', 0, imghandler.vm.domid, 0, 0) +xen.addprop('reg', long(imghandler.vm.domid), long(0)) xen.addprop('domain-name', imghandler.vm.getName() + '\0') xencons = xen.addnode('console') xencons.addprop('interrupts', 1, 0) @@ -301,14 +303,14 @@ def build(imghandler): # RMA node rma = root.addnode('[EMAIL PROTECTED]') -rma.addprop('reg', 0, 0, 0, rma_bytes) +rma.addprop('reg', long(0), long(rma_bytes)) rma.addprop('device_type', 'memory\0') # all the rest in a single node remaining = totalmem - rma_bytes if remaining 0: mem = root.addnode('[EMAIL PROTECTED]') -mem.addprop('reg', 0, rma_bytes, 0, remaining) +mem.addprop('reg', long(rma_bytes), long(remaining)) mem.addprop('device_type', 'memory\0') # add CPU nodes @@ -346,8 +348,8 @@ def build(imghandler): chosen.addprop('interrupt-controller', xen.get_phandle()) chosen.addprop('bootargs', imghandler.cmdline + '\0') # xc_linux_load.c will overwrite these 64-bit properties later -chosen.addprop('linux,initrd-start', 0, 0) -chosen.addprop('linux,initrd-end', 0, 0) +chosen.addprop('linux,initrd-start', long(0)) +chosen.addprop('linux,initrd-end', long(0)) if 1: f = file('/tmp/domU.dtb', 'w') ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values
This patch is not yet in our tree. I am getting a little tired of doing this. Maria Butricointernet or sametime: [EMAIL PROTECTED]; Notes: Maria Butrico/Watson/IBM Jimi Xenidis [EMAIL PROTECTED] .com To Orran Y Krieger/Watson/[EMAIL PROTECTED], 10/18/2006 04:40 Maria Butrico/Watson/[EMAIL PROTECTED], PM[EMAIL PROTECTED] cc XenPPC-devel xen-ppc-devel@lists.xensource.com Subject Re: [XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values The following changeset should fix the issue with DomU =2G where our python devtree code can only handle ints and math from a 2G value promotes the type to long which before this patch we could not encode. Please test on larger systems. -JX On Oct 18, 2006, at 4:20 PM, Xen patchbot-xenppc-unstable wrote: # HG changeset patch # User Jimi Xenidis [EMAIL PROTECTED] # Node ID d18a0c0b77d7004631559d4e2f9d31744fe9b34a # Parent ece7037c72c6b7944ede2261ec1fe99c1489cff4 [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values When creating a 2G DomU pyhton chokes when it sees a long type. If a value is of type long, or promoted to long it should be packed as a quad. Signed-off-by: Jimi Xenidis [EMAIL PROTECTED] --- tools/python/xen/xend/FlatDeviceTree.py | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff -r ece7037c72c6 -r d18a0c0b77d7 tools/python/xen/xend/ FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.pyWed Oct 18 11:29:57 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.pyWed Oct 18 16:07:33 2006 -0400 @@ -37,8 +37,10 @@ def _bincat(seq, separator=''): '''Concatenate the contents of seq into a bytestream.''' strs = [] for item in seq: -if type(item) == type(0): +if isinstance(item, int): strs.append(struct.pack(I, item)) +elif isinstance(item, long): +strs.append(struct.pack(Q, item)) else: try: strs.append(item.to_bin()) @@ -287,9 +289,9 @@ def build(imghandler): root.addprop('compatible', 'Momentum,Maple\0') xen = root.addnode('xen') -xen.addprop('start-info', 0, 0x3ffc000, 0, 0x1000) +xen.addprop('start-info', long(0x3ffc000), long(0x1000)) xen.addprop('version', 'Xen-3.0-unstable\0') -xen.addprop('reg', 0, imghandler.vm.domid, 0, 0) +xen.addprop('reg', long(imghandler.vm.domid), long(0)) xen.addprop('domain-name', imghandler.vm.getName() + '\0') xencons = xen.addnode('console') xencons.addprop('interrupts', 1, 0) @@ -301,14 +303,14 @@ def build(imghandler): # RMA node rma = root.addnode('[EMAIL PROTECTED]') -rma.addprop('reg', 0, 0, 0, rma_bytes) +rma.addprop('reg', long(0), long(rma_bytes)) rma.addprop('device_type', 'memory\0') # all the rest in a single node remaining = totalmem - rma_bytes if remaining 0: mem = root.addnode('[EMAIL PROTECTED]') -mem.addprop('reg', 0, rma_bytes, 0, remaining) +mem.addprop('reg', long(rma_bytes), long(remaining)) mem.addprop('device_type', 'memory\0') # add CPU nodes @@ -346,8 +348,8 @@ def build(imghandler): chosen.addprop('interrupt-controller', xen.get_phandle()) chosen.addprop('bootargs', imghandler.cmdline + '\0') # xc_linux_load.c will overwrite these 64-bit properties later -chosen.addprop('linux,initrd-start', 0, 0) -chosen.addprop('linux,initrd-end', 0, 0) +chosen.addprop('linux,initrd-start', long(0)) +chosen.addprop('linux,initrd-end', long(0)) if 1: f = file('/tmp/domU.dtb', 'w') ___ Xen-ppc-devel mailing list Xen-ppc-devel
Re: [XenPPC] [xenppc-unstable] [TOOLS][POWERPC] use python quad encoding for 2 cell devtree values
On Oct 18, 2006, at 5:50 PM, Maria Butrico wrote: This patch is not yet in our tree. I am getting a little tired of doing this. I bet! It can certainly wait, just know that you cannot create = 2G domains until this makes it in to your stuff. -JX ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel