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

Re: [Xen-devel] [PATCH v2 for-4.7] xen/nested_p2m: Don't walk EPT tables with a regular PT walker



On Fri, May 13, 2016 at 06:25:41PM +0100, Andrew Cooper wrote:
> 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.cooper3@xxxxxxxxxx>

Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

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