From: "Jan Beulich" Subject: Re: 1GB hugepages and intel_xc_cpuid_policy by default disables it. Date: Mon, 13 Jan 2014 11:30:43 +0000 Message-ID: <52D3DC730200007800112FF6@nat28.tlf.novell.com> References: <20140110184151.GA20232@pegasus.dumpdata.com> <1389607803.8187.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W2fjE-0000yn-08 for xen-devel@lists.xenproject.org; Mon, 13 Jan 2014 11:30:48 +0000 In-Reply-To: <1389607803.8187.22.camel@kazak.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com, jun.nakajima@intel.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 13.01.14 at 11:10, Ian Campbell wrote: > On Fri, 2014-01-10 at 13:41 -0500, Konrad Rzeszutek Wilk wrote: >> and this is the only way to get hugepages working >> (for reference here is what I have in the guest command line: >> "default_hugepagesz=1G hugepagesz=1G hugepages=2 hugepagesz=2M >> hugepages=100" and without this cpuid I get: >> hugepagesz: Unsupported page size 1024 M >> >> because the 1GB flag is not exposed. >> >> I was wondering why we don't check the host cpuid and set the 1GB >> flag (pdpe1gb) for those cases? It seems that all the pieces are in >> place for this to work? > > The hypervisor currently contains : > /* Hide 1GB-superpage feature if we can't emulate it. */ > if (!hvm_pse1gb_supported(d)) > *edx &= ~cpufeat_mask(X86_FEATURE_PAGE1GB); > > So I think it would be safe to enable this by default in userspace and > let the hypervisor clear it if unsafe. But TBH the whole cpuid policy is > a mystery to me. Can you cc some likely hypervisor side people on your > patch for confirmation please. In fact I can't see where this would be forced off: xc_cpuid_x86.c only does so in the PV case, and all hvm_pse1gb_supported() is that the CPU supports it and the domain uses HAP. Jan