* [PATCH] [VT] Fix VMX guest memory calculation in python code
@ 2005-09-22 8:34 Li, Xin B
2005-09-22 10:22 ` Ewan Mellor
0 siblings, 1 reply; 2+ messages in thread
From: Li, Xin B @ 2005-09-22 8:34 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
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>
[-- Attachment #2: vmx_sdl_fix.patch --]
[-- Type: application/octet-stream, Size: 1938 bytes --]
diff -r a32ee93b3b33 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Wed Sep 21 22:41:34 2005
+++ b/tools/python/xen/xend/image.py Thu Sep 22 16:14:09 2005
@@ -298,6 +296,18 @@
store_evtchn = self.vm.store_channel.port2
else:
store_evtchn = 0
+
+ log.debug("dom = %d", self.vm.getDomain())
+ log.debug("image = %s", self.kernel)
+ log.debug("control_evtchn = %d", self.device_channel.port2)
+ log.debug("store_evtchn = %d", store_evtchn)
+ log.debug("memsize = %d", self.vm.getMemoryTarget() / 1024)
+ log.debug("memmap = %s", self.memmap_value)
+ log.debug("cmdline = %s", self.cmdline)
+ log.debug("ramdisk = %s", self.ramdisk)
+ log.debug("flags = %d", self.flags)
+ log.debug("vcpus = %d", self.vm.getVCpuCount())
+
ret = xc.vmx_build(dom = self.vm.getDomain(),
image = self.kernel,
control_evtchn = self.device_channel.port2,
@@ -400,7 +410,7 @@
args = args + vnc
args = args + ([ "-d", "%d" % self.vm.getDomain(),
"-p", "%d" % self.device_channel.port1,
- "-m", "%s" % self.vm.getMemoryTarget() / 1024 ])
+ "-m", "%s" % (self.vm.getMemoryTarget() / 1024)])
args = args + self.dmargs
env = dict(os.environ)
env['DISPLAY'] = self.display
@@ -435,7 +445,7 @@
"""@see ImageHandler.getDomainMemory"""
# for ioreq_t and xenstore
static_pages = 2
- return mem + self.getPageTableSize(mem * 1024) + 4 * static_pages
+ return mem + self.getPageTableSize(mem / 1024) + 4 * static_pages
def getPageTableSize(self, mem_mb):
"""Return the size of memory needed for 1:1 page tables for physical
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] [VT] Fix VMX guest memory calculation in python code
2005-09-22 8:34 [PATCH] [VT] Fix VMX guest memory calculation in python code Li, Xin B
@ 2005-09-22 10:22 ` Ewan Mellor
0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2005-09-22 10:22 UTC (permalink / raw)
To: xen-devel
On Thu, Sep 22, 2005 at 04:34:32PM +0800, Li, Xin B wrote:
> 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>
Applied, thanks.
Ewan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-22 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-22 8:34 [PATCH] [VT] Fix VMX guest memory calculation in python code Li, Xin B
2005-09-22 10:22 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.