From: Ian Campbell Subject: Re: 1GB hugepages and intel_xc_cpuid_policy by default disables it. Date: Mon, 13 Jan 2014 11:38:29 +0000 Message-ID: <1389613109.13654.43.camel@kazak.uk.xensource.com> References: <20140110184151.GA20232@pegasus.dumpdata.com> <1389607803.8187.22.camel@kazak.uk.xensource.com> <52D3DC730200007800112FF6@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W2fqj-0001ak-Sa for xen-devel@lists.xenproject.org; Mon, 13 Jan 2014 11:38:34 +0000 In-Reply-To: <52D3DC730200007800112FF6@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel@lists.xenproject.org, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org On Mon, 2014-01-13 at 11:30 +0000, Jan Beulich wrote: > 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. Took me a while to spot it too: static void intel_xc_cpuid_policy( [...] case 0x80000001: { int is_64bit = hypervisor_is_64bit(xch) && is_pae; /* Only a few features are advertised in Intel's 0x80000001. */ regs[2] &= (is_64bit ? bitmaskof(X86_FEATURE_LAHF_LM) : 0) | bitmaskof(X86_FEATURE_ABM); regs[3] &= ((is_pae ? bitmaskof(X86_FEATURE_NX) : 0) | (is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) | (is_64bit ? bitmaskof(X86_FEATURE_SYSCALL) : 0) | (is_64bit ? bitmaskof(X86_FEATURE_RDTSCP) : 0)); break; } Which masks anything which is not explicitly mentioned. (PAGE1GB is in regs[3], I think). The AMD version is more permissive: regs[3] &= (0x0183f3ff | /* features shared with 0x00000001:EDX */ (is_pae ? bitmaskof(X86_FEATURE_NX) : 0) | (is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) | bitmaskof(X86_FEATURE_SYSCALL) | bitmaskof(X86_FEATURE_MP) | bitmaskof(X86_FEATURE_MMXEXT) | bitmaskof(X86_FEATURE_FFXSR) | bitmaskof(X86_FEATURE_3DNOW) | bitmaskof(X86_FEATURE_3DNOWEXT)); (but I didn't check if PAGE1GB is in that magic number...) Ian.