> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Saturday, May 14, 2016 1:26 AM > > hostmode->p2m_ga_to_gfn() is a plain PT walker, and is not appropriate for a > general L1 p2m walk. It is fine for AMD as NPT share the same format as > normal pagetables. For Intel EPT however, it is wrong. > > The translation ends up correct (as the formats are sufficiently similar), but > the control bits in lower 12 bits differ in meaning. A plain PT walker sets > A/D bits (bits 5 and 6) as it walks, but in EPT tables, these are the IPAT and > top bit of EMT (caching type). This in turn causes problem when the EPT > tables are subsequently used. > > Replace hostmode->p2m_ga_to_gfn() with nestedhap_walk_L1_p2m() in > paging_gva_to_gfn(), which is the correct function for the task. This > involves making nestedhap_walk_L1_p2m() non-static, and adding > vmx_vmcs_enter/exit() pairs to nvmx_hap_walk_L1_p2m() as it is now reachable > from contexts other than v == current. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Reviewed-by: Kevin Tian <kevin.t...@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel