ia64/xen-unstable

changeset 7014:0f71667deb52

VMX guest memory calculation in python code is corrupted by changeset
6984, this patch fixes it.

Also print vmx builder parameters before calling vmx builer, just like
what's done before calling linux builder.

With this patch, qemu dm using SDL can work, however qemu dm using VNC
still has bug, we will fix it soon.

Signed-off-by: Xin Li <xin.b.li@intel.com>
author emellor@ewan
date Thu Sep 22 11:21:37 2005 +0100 (2005-09-22)
parents 11cca45a9a79
children 7646b18d4b32
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Thu Sep 22 11:09:11 2005 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Thu Sep 22 11:21:37 2005 +0100
     1.3 @@ -300,6 +300,18 @@ class VmxImageHandler(ImageHandler):
     1.4              store_evtchn = self.vm.store_channel.port2
     1.5          else:
     1.6              store_evtchn = 0
     1.7 +
     1.8 +        log.debug("dom            = %d", self.vm.getDomain())
     1.9 +        log.debug("image          = %s", self.kernel)
    1.10 +        log.debug("control_evtchn = %d", self.device_channel.port2)
    1.11 +        log.debug("store_evtchn   = %d", store_evtchn)
    1.12 +        log.debug("memsize        = %d", self.vm.getMemoryTarget() / 1024)
    1.13 +        log.debug("memmap         = %s", self.memmap_value)
    1.14 +        log.debug("cmdline        = %s", self.cmdline)
    1.15 +        log.debug("ramdisk        = %s", self.ramdisk)
    1.16 +        log.debug("flags          = %d", self.flags)
    1.17 +        log.debug("vcpus          = %d", self.vm.getVCpuCount())
    1.18 +
    1.19          ret = xc.vmx_build(dom            = self.vm.getDomain(),
    1.20                             image          = self.kernel,
    1.21                             control_evtchn = self.device_channel.port2,
    1.22 @@ -402,7 +414,7 @@ class VmxImageHandler(ImageHandler):
    1.23              args = args + vnc
    1.24          args = args + ([ "-d",  "%d" % self.vm.getDomain(),
    1.25                    "-p", "%d" % self.device_channel.port1,
    1.26 -                  "-m", "%s" % self.vm.getMemoryTarget() / 1024 ])
    1.27 +                  "-m", "%s" % (self.vm.getMemoryTarget() / 1024)])
    1.28          args = args + self.dmargs
    1.29          env = dict(os.environ)
    1.30          env['DISPLAY'] = self.display
    1.31 @@ -437,7 +449,7 @@ class VmxImageHandler(ImageHandler):
    1.32          """@see ImageHandler.getDomainMemory"""
    1.33          # for ioreq_t and xenstore
    1.34          static_pages = 2
    1.35 -        return mem + self.getPageTableSize(mem * 1024) + 4 * static_pages
    1.36 +        return mem + self.getPageTableSize(mem / 1024) + 4 * static_pages
    1.37              
    1.38      def getPageTableSize(self, mem_mb):
    1.39          """Return the size of memory needed for 1:1 page tables for physical