All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Xen-devel <xen-devel@lists.xen.org>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH v2 for-4.7] xen/nested_p2m: Don't walk EPT tables with a regular PT walker
Date: Wed, 18 May 2016 14:50:53 +0100	[thread overview]
Message-ID: <20160518135053.GF8974@citrix.com> (raw)
In-Reply-To: <1463160341-6080-1-git-send-email-andrew.cooper3@citrix.com>

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@citrix.com>

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

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

  parent reply	other threads:[~2016-05-18 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 13:33 [PATCH for-4.7] xen/nested_p2m: Don't walk EPT tables with a regular PT walker Andrew Cooper
2016-05-13 14:13 ` Jan Beulich
2016-05-13 15:00   ` Andrew Cooper
2016-05-13 15:19     ` Jan Beulich
2016-05-13 17:25       ` [PATCH v2 " Andrew Cooper
2016-05-17  6:06         ` Tian, Kevin
2016-05-18 13:36         ` George Dunlap
2016-05-18 13:50         ` Wei Liu [this message]
2016-05-13 15:24     ` [PATCH " Andrew Cooper
2016-05-13 15:31       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160518135053.GF8974@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.