'stepping' : cpuinfo[number]['stepping'],
'flags' : cpuinfo[number]['flags'],
})
- elif arch.type == "ia64":
- self.cpus[u].update(
- { 'host' : self.uuid,
- 'features' : cpu_features,
- 'speed' : int(float(cpuinfo[number]['cpu MHz'])),
- 'vendor' : cpuinfo[number]['vendor'],
- 'modelname': cpuinfo[number]['family'],
- 'stepping' : cpuinfo[number]['model'],
- 'flags' : cpuinfo[number]['features'],
- })
else:
self.cpus[u].update(
{ 'host' : self.uuid,
log.debug("features = %s", self.vm.getFeatures())
log.debug("flags = %d", self.flags)
log.debug("superpages = %d", self.superpages)
- if arch.type == "ia64":
- log.debug("vhpt = %d", self.vhpt)
return xc.linux_build(domid = self.vm.getDomid(),
memsize = mem_mb,
return rc
-class IA64_HVM_ImageHandler(HVMImageHandler):
-
- def configure(self, vmConfig):
- HVMImageHandler.configure(self, vmConfig)
- self.vhpt = int(vmConfig['platform'].get('vhpt', 0))
- self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024
-
- def buildDomain(self):
- xc.nvram_init(self.vm.getName(), self.vm.getDomid())
- xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_VHPT_SIZE, self.vhpt)
- if self.guest_os_type is not None:
- xc.set_os_type(self.guest_os_type.lower(), self.vm.getDomid())
- return HVMImageHandler.buildDomain(self)
-
- def getRequiredAvailableMemory(self, mem_kb):
- page_kb = 16
- # ROM size for guest firmware, io page, xenstore page
- # buffer io page, buffer pio page and memmap info page
- extra_pages = 1024 + 5
- mem_kb += extra_pages * page_kb
- mem_kb += self.vramsize
- return mem_kb
-
- def getRequiredInitialReservation(self):
- return self.vm.getMemoryTarget()
-
- def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb):
- # Explicit shadow memory is not a concept
- return 0
-
- def getDeviceModelArgs(self, restore = False):
- args = HVMImageHandler.getDeviceModelArgs(self, restore)
- args = args + ([ "-m", "%s" %
- (self.getRequiredInitialReservation() / 1024) ])
- return args
-
- def setCpuid(self):
- # Guest CPUID configuration is not implemented yet.
- return
-
-class IA64_Linux_ImageHandler(LinuxImageHandler):
-
- def configure(self, vmConfig):
- LinuxImageHandler.configure(self, vmConfig)
- self.vhpt = int(vmConfig['platform'].get('vhpt', 0))
-
- def setCpuid(self):
- # Guest CPUID configuration is not implemented yet.
- return
-
class X86_HVM_ImageHandler(HVMImageHandler):
def configure(self, vmConfig):
return rc
_handlers = {
- "ia64": {
- "linux": IA64_Linux_ImageHandler,
- "hvm": IA64_HVM_ImageHandler,
- },
"x86": {
"linux": X86_Linux_ImageHandler,
"hvm": X86_HVM_ImageHandler,
return rdpath
-# Begin: Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors
+# Begin: Intel as well as AMD 32-bit and 64-bit processors
def ia_checkBuffer(buffer):
return
def ia_minSafeMem():
return 32
-def ia64_minSafeMem():
- return 128
-
def ia_getDeviceModel():
"""Get the path to the device model based on
the architecture reported in uname"""
"serial" : "pty",
"device_model" : ia_getDeviceModel(),
}
-# End : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors
+# End : Intel as well as AMD 32-bit and 64-bit processors
"""Convert from uname specification to a more general platform."""
_uname_to_arch_map = {
"i586" : "x86",
"i686" : "x86",
"x86_64": "x86_64",
- "ia64" : "ia64",
}
# Lookup current platform.
_arch = _uname_to_arch_map.get(os.uname()[4], "Unknown")
-if _arch == "x86" or _arch == "x86_64" or _arch == "ia64":
+if _arch == "x86" or _arch == "x86_64":
minSafeMem = ia_minSafeMem
getDefaultKernel = ia_getDefaultKernel
checkBuffer = ia_checkBuffer
else:
configDefaults['extra'] = clause
- if _arch == "ia64":
- minSafeMem = ia64_minSafeMem
- configDefaults['memory'] = ia64_minSafeMem()
-
else:
raise ValueError, "Unknown architecture!"