[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] 1GB hugepages and intel_xc_cpuid_policy by default disables it.



On Fri, 2014-01-10 at 13:41 -0500, Konrad Rzeszutek Wilk wrote:
> Hey,
> 
> It occured to me that when booting Linux HVM guests, the 1GB hugepage
> cpuid is not exposed. One needs to manually do:
> 
>  cpuid= ['0x80000001:edx=xxxxx1xxxxxxxxxxxxxxxxxxxxxxxxxx'] 
> or 
>  cpuid="host,page1gb=k"

> (see http://lists.xenproject.org/archives/html/xen-users/2013-09/msg00083.html
> for some discussion about it).
> 
> The machine I am using is supporting it:
> 
>  (XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB 

HAP page sizes is unrelated to the page sizes supported in "first stage"
paging, although I suppose it is unlikely for EPT to support it without
the primary translation supporting it.

> 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.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.