ia64/xen-unstable

changeset 15217:d1cce5bafe28

xm-test: ia64 min memory & arbitrarily large ramdisk

1) Sets a minimum of 128MB RAM for an ia64 domU; this limit was set
after experimentation, which seems to indicate it's a reasonable lower
limit (the 32MB limit previously in place did not allow an ia64 domU
to start). If there's any problem with this, I don't mind splitting
the patch and sending it to the ia64 list, but it was small, so I hope
it's okay to include it.

2) xm-test uses ramdisks built with uClibc, which doesn't compile on
ia64. I was able to create a ramdisk by hand, but as it was too
large, the resultant domU crashed after boot. This patch enables the
use of an arbitrarily large ramdisk, so long as it's uncompressed. As
xm-test builds only uncompressed ramdisks, I figured this was
reasonable for that specific application. Suggestions on how to
detect and handle a compressed ramdisk would be welcome.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kfraser@localhost.localdomain
date Thu May 24 15:40:54 2007 +0100 (2007-05-24)
parents e046da853ffc
children 16e376ed5638
files tools/xm-test/lib/XmTestLib/arch.py
line diff
     1.1 --- a/tools/xm-test/lib/XmTestLib/arch.py	Thu May 24 15:36:13 2007 +0100
     1.2 +++ b/tools/xm-test/lib/XmTestLib/arch.py	Thu May 24 15:40:54 2007 +0100
     1.3 @@ -46,6 +46,9 @@ def ia_checkBuffer(buffer):
     1.4  def ia_minSafeMem():
     1.5      return 32
     1.6  
     1.7 +def ia64_minSafeMem():
     1.8 +    return 128
     1.9 +
    1.10  def ia_getDeviceModel():
    1.11      """Get the path to the device model based on
    1.12      the architecture reported in uname"""
    1.13 @@ -139,6 +142,17 @@ if _arch == "x86" or _arch == "x86_64" o
    1.14          configDefaults = ia_HVMDefaults
    1.15      else:
    1.16          configDefaults = ia_ParavirtDefaults
    1.17 +
    1.18 +    # note: xm-test generates an uncompressed image, and this code
    1.19 +    # expects one.  This will fail with a gzip-ed image. 
    1.20 +    if configDefaults['ramdisk']:
    1.21 +        rd_size = os.stat(configDefaults['ramdisk']).st_size
    1.22 +        configDefaults['extra'] = 'ramdisk_size=' + str((rd_size / 1024)+1)
    1.23 +
    1.24 +    if _arch == "ia64":
    1.25 +        minSafeMem = ia64_minSafeMem
    1.26 +        configDefaults['memory'] = ia64_minSafeMem()
    1.27 +
    1.28  elif _arch == "powerpc":
    1.29      minSafeMem = ppc_minSafeMem
    1.30      getDefaultKernel = ppc_getDefaultKernel