From: Ian Campbell Subject: Re: [PATCH V3 1/5] libxl: bump LIBXL_MAXMEM_CONSTANT to 2048 Date: Fri, 1 Nov 2013 16:02:17 +0000 Message-ID: <1383321737.672.106.camel@kazak.uk.xensource.com> References: <1383046791-1256-1-git-send-email-wei.liu2@citrix.com> <1383046791-1256-2-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383046791-1256-2-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Stefano Stabellini , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2013-10-29 at 11:39 +0000, Wei Liu wrote: > When using OVMF we need to have 1MiB of memory in place for firmware. > Without this change we have: > > (XEN) HVM128: Loading OVMF ... > (XEN) page_alloc.c:1460:d128 Over-allocation for domain 128: 33025 > 33024 > (XEN) memory.c:132:d128 Could not allocate order=0 extent: id=128 memflags=0 (0 of 1) > > This is not a fatal error as hvmloader will instead use low memory to > load OVMF, but it's better to eliminate such error. > > Changing this constant doesn't necessary increase the total amount of > memory a guest uses because it's just a limit. It will allow a guest to try and use up to 1MB more though, and it allows this for PV guests as well as HVM guests not using OVMF. There's only a small number of place which use this constant, can we refactor them into a helper function, which can then be expanded to include a per-BIOS overhead in addition to this one? The BIOS selection is stored in xenstore, so that work even for calls which don't have the domain configuration to hand. (does anyone remember what the existing 1MB is actually for?)