How to set hap in configure file to enable EPT support

327 views
Skip to first unread message

csuji...@gmail.com

unread,
Apr 26, 2015, 11:01:47 AM4/26/15
to vmit...@googlegroups.com
hi, everyone:

         My compute is support EPT. but i couldn't find where i could set the hap to enable EPT support. In dom0,and domU,where i couldn't find  the config file to set the hap?
         
         My host operation system is centos 6.6. my cpu id is i7 4790

         thanks again!
QQ图片20150426225541.png
QQ图片20150426225807.png

Tamas K Lengyel

unread,
Apr 26, 2015, 12:47:56 PM4/26/15
to vmit...@googlegroups.com
EPT is enabled by default when your hardware supports it. If you add "hap=1" to your HVM VM's config, it will force Xen to use EPT instead of shadow paging. But it should be used by default anyway.

Tamas

--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at http://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.

Steven Maresca

unread,
Apr 26, 2015, 1:55:24 PM4/26/15
to vmit...@googlegroups.com
There are multiple components to EPT support.  Please note that you will see EPT referenced in documentation as Extended Page Tables (EPT, an Intel feature), Rapid Virtualization Indexing (RVI, an AMD feature), and generic terms like Hardware Assisted Paging (HAP) and nested paging.

When EPT is usable by the hypervisor, Xen enables it by default for HVM virtual machines. This means that no configuration file changes are necessary, and you should never need to enable it for a VM unless you are using a very old version of Xen.  If that is the case, the only configuration file you may need to modify is the same one that you created for the virtual machine itself ( see item 4 below).  It is our recommendation that you use the latest release of Xen -- you should avoid releases lower than Xen 4.2.

1) Make sure your CPU supports HAP; this you have already confirmed. With that said, if you ever need to check CPU features before purchasing, http://ark.intel.com is an excellent place to do so. Your CPU at that site http://ark.intel.com/products/80806/Intel-Core-i7-4790-Processor-8M-Cache-up-to-4_00-GHz clearly shows EPT support. AMD and other vendors provide similar mechanisms.

2) Make sure nested paging is not disabled in your BIOS. Occasionally, the ept flag will be shown in /proc/cpuinfo even when the CPU feature has been disabled in the BIOS. Verifying BIOS configuration helps.

3) Confirm that Xen is aware of and able to use EPT.  Run 'xl dmesg | grep HAP' -- if Xen is able to use Intel EPT for your CPU, you should see something like:
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB

4) If Xen is able to use EPT, it is always enabled by current versions of Xen for a virtual machine. If you are using an older version of Xen, you can add hap=1 to the configuration file you created for the virtual machine. Please be aware that this configuration file can exist in any directory/path, so its location is known only to the person who created the virtual machine.  If a GUI/management tool was used to create the VM, consult the documentation for that tool. Keep in mind that HAP is enabled by default when Xen detects it.  You can confirm hap is enabled for a VM when the output of  'xl list -l 1 | grep -i hap' is "hap": "<default>"

Steve

--
Reply all
Reply to author
Forward
0 new messages