From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: [PATCH] Disallow setting maxmem to higher value than total physical memory size Date: Wed, 01 Sep 2010 17:10:15 +0200 Message-ID: <4C7E6CD7.3000900@redhat.com> References: <4C7E47B2.9010805@redhat.com> <1283345049.12544.9494.camel@zakaz.uk.xensource.com> <4C7E4EAD.3060106@redhat.com> <1283348230.12544.9506.camel@zakaz.uk.xensource.com> <4C7E60D0.8050706@redhat.com> <4C7E7ED30200007800013BF0@vpn.id2.novell.com> <4C7E6833.5000509@redhat.com> <4C7E86920200007800013C1C@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C7E86920200007800013C1C@vpn.id2.novell.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: Jan Beulich Cc: Ian Campbell , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 09/01/2010 05:00 PM, Jan Beulich wrote: >>>> On 01.09.10 at 16:50, Michal Novotny wrote: >>>> >> On 09/01/2010 04:26 PM, Jan Beulich wrote: >> >>>>>> On 01.09.10 at 16:18, Michal Novotny wrote: >>>>>> >>>>>> >>>> Oh, ok. It's not limited to dom0 nevertheless I don't see anything to be >>>> >>>> >>> And how does this play together with physical memory hotplug? >>> >>> Jan >>> >>> >>> >> Well, it's reading the physical memory size using the xc.physinfo() call >> so if this is handled correctly by hypervisor (since this basically >> issues a hypercall) then it should be working fine. >> > Meaning the tools would auto-adjust maxmem_kb' for Dom0 when > new memory got added? I can't see where that happens. > > Jan > > It's all based on xc.physinfo() call which is basically a hypercall. If there's a valid value coming from the hypervisor then it would be working fine. You can see the call is there always on this line of my patch: + total_mem = int(xc.physinfo()['total_memory']) If this is handled correctly by hypervisor then we're good in user-space as can be seen in tools/python/xen/lowlevel/xc/xc.c and tools/libxl/libxl.c where call to tools/libxc/xc_misc.c:xc_physinfo() resides. Michal -- Michal Novotny, RHCE Virtualization Team (xen userspace), Red Hat