From: tgh Subject: question about running vm change its mem maxsize Date: Mon, 19 Mar 2007 09:20:33 +0800 Message-ID: <45FDE561.5060504@ncic.ac.cn> References: <31436f4a0703171215m3f18a72an583b5633b6a8b66a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <31436f4a0703171215m3f18a72an583b5633b6a8b66a@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org hi I read the code of xc_linux_build() and xc_domain_setmaxmem(),and I am confused about how does "xm mem-max" change the max size of mem for a running VM In xc_domain_setmaxmem() ,the XEN_DOMCTL_max_mem has been called ,and just does "d->max_pages = new_max;" while in the xc_linux_build(), before the vm boots up,the maxsize pfn is alloced in an array with fixsize, page_array = malloc(nr_pages * sizeof(unsigned long)) then how does a running vm changes its mem maxsize ,especially for expanding its mem maxsize? I am confused about it could you help me Thanks in advance