From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: Design question for PV superpage support Date: Mon, 02 Mar 2009 17:15:43 -0800 Message-ID: <49AC84BF.40802@goop.org> References: <200903020754.23534.dcm@mccr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200903020754.23534.dcm@mccr.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dave McCracken Cc: Xen Developers List List-Id: xen-devel@lists.xenproject.org Dave McCracken wrote: > The solution I am working on for how to support Linux hugepages (Xen > superpages) involves creating domains made up entirely of superpages. I can > create a working domain with superpages and am in the process of supporting > it in save/restore. > > For this to work properly this should be an attribute of a domain, specified > somewhere in domain configuration and attached to that domain for its > lifetime. This way it could be checked at memory populate time, save/restore > time, and by the various balloon drivers. > > My question is for those of you who best know the overall Xen design > principles. Where should the flag be specified by the user? Where should it > best be set in the running domain? I've seen some examples of flags being > passed around, but would like some guidance on the best place to put it to > fit into the Xen design. One thing I'm not quite sure about: when you support 2M pages for a domain, is it fully-supported, to the extent you can safely set PSE in cpuid, and allow the guest kernel to use 2M mappings as it usually would? Or are there further restrictions? You should support a feature flag in the guest kernel's ELF notes to say that it support large PV pages. If the kernel asks for it, then you can enable PSE in cpuid, or have some other mechanism for the kernel to query that the feature is available. J