xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 7/7] x86/pagewalk: Re-implement the pagetable walker
Date: Mon, 6 Mar 2017 18:39:38 +0000	[thread overview]
Message-ID: <fef20bdf-f76b-a7fa-712d-04c848daf88d@citrix.com> (raw)
In-Reply-To: <ad925449-c583-ecd2-5e82-011598f39786@citrix.com>

On 06/03/17 18:33, Andrew Cooper wrote:
> On 06/03/17 18:28, George Dunlap wrote:
>> On 27/02/17 14:03, Andrew Cooper wrote:
>>> The existing pagetable walker has complicated return semantics, which squeeze
>>> multiple pieces of information into single integer.  This would be fine if the
>>> information didn't overlap, but it does.
>>>
>>> Specifically, _PAGE_INVALID_BITS for 3-level guests alias _PAGE_PAGED and
>>> _PAGE_SHARED.  A guest which constructs a PTE with bits 52 or 53 set (the
>>> start of the upper software-available range) will create a virtual address
>>> which, when walked by Xen, tricks Xen into believing the frame is paged or
>>> shared.  This behaviour was introduced by XSA-173 (c/s 8b17648).
>>>
>>> It is also complicated to turn rc back into a normal pagefault error code.
>>> Instead, change the calling semantics to return a boolean indicating success,
>>> and have the function accumulate a real pagefault error code as it goes
>>> (including synthetic error codes, which do not alias hardware ones).  This
>>> requires an equivalent adjustment to map_domain_gfn().
>>>
>>> Issues fixed:
>>>  * 2-level PSE36 superpages now return the correct translation.
>>>  * 2-level L2 superpages without CR0.PSE now return the correct translation.
>>>  * SMEP now inhibits a user instruction fetch even if NX isn't active.
>>>  * Supervisor writes without CR0.WP now set the leaf dirty bit.
>>>  * L4e._PAGE_GLOBAL is strictly reserved on AMD.
>>>  * 3-level l3 entries have all reserved bits checked.
>>>  * 3-level entries can no longer alias Xen's idea of paged or shared.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> Andy,
>>
>> Have you got this in a tree somewhere?  This doesn't seem to apply to
>> staging, and I don't think I'm going to be able to give it a proper
>> review without seeing the changes in-situ.  (Or if you're close to
>> reposting I'll wait for the repost.)
> 
> I do have some bits an pieces (although I am some of your acks on the
> earlier trivial patches.)

Yeah, patch 4 it seems has been checked in already, and because of that
I somehow got confused into thinking that more of them were checked in
when I was going through the series.  I'm about to head out tonight, but
I'll give Acks or Reviews to the earlier ones tomorrow when I come back in.

> This patch isn't going to change in any significant way, so here you go.
> 
> http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/pagewalk-v1

Thanks.

 -George


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

  reply	other threads:[~2017-03-06 18:39 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 14:03 [PATCH 0/7] Fixes to pagetable handling Andrew Cooper
2017-02-27 14:03 ` [PATCH 1/7] x86/hvm: Correctly identify implicit supervisor accesses Andrew Cooper
2017-03-01 15:05   ` Jan Beulich
2017-03-02 16:14   ` Tim Deegan
2017-03-07 10:46   ` George Dunlap
2017-03-07 10:51   ` Andrew Cooper
2017-03-07 15:00   ` Paul Durrant
2017-02-27 14:03 ` [PATCH 2/7] x86/shadow: Try to correctly " Andrew Cooper
2017-03-01 15:11   ` Jan Beulich
2017-03-02 16:14   ` Tim Deegan
2017-03-07 11:26   ` George Dunlap
2017-03-07 11:55     ` Andrew Cooper
2017-02-27 14:03 ` [PATCH 3/7] x86/pagewalk: Helpers for reserved bit handling Andrew Cooper
2017-03-01 15:57   ` Jan Beulich
2017-03-02 12:23     ` Andrew Cooper
2017-03-02 14:12   ` Tim Deegan
2017-03-02 14:17     ` Andrew Cooper
2017-03-02 15:09       ` Tim Deegan
2017-03-02 15:14         ` Andrew Cooper
2017-03-02 16:15   ` Tim Deegan
2017-02-27 14:03 ` [PATCH 4/7] x86/hvm: Adjust hvm_nx_enabled() to match how Xen behaves Andrew Cooper
2017-03-01 16:00   ` Jan Beulich
2017-02-27 14:03 ` [PATCH 5/7] x86/shadow: Use the pagewalk reserved bits helpers Andrew Cooper
2017-03-01 16:03   ` Jan Beulich
2017-03-02 12:26     ` Andrew Cooper
2017-03-02 12:51       ` Jan Beulich
2017-03-02 12:56         ` Andrew Cooper
2017-03-02 13:19           ` Jan Beulich
2017-03-02 14:32             ` Andrew Cooper
2017-03-06  9:26       ` Tim Deegan
2017-03-02 14:33   ` Tim Deegan
2017-02-27 14:03 ` [PATCH 6/7] x86/pagewalk: Consistently use guest_walk_*() helpers for translation Andrew Cooper
2017-03-01 16:22   ` Jan Beulich
2017-03-01 16:33     ` Andrew Cooper
2017-03-01 16:41       ` Jan Beulich
2017-03-02 16:15   ` Tim Deegan
2017-03-06 18:25   ` George Dunlap
2017-02-27 14:03 ` [PATCH 7/7] x86/pagewalk: Re-implement the pagetable walker Andrew Cooper
2017-03-02 11:52   ` Jan Beulich
2017-03-02 12:00     ` Andrew Cooper
2017-03-02 12:54       ` Jan Beulich
2017-03-02 16:16   ` Tim Deegan
2017-03-06 18:28   ` George Dunlap
2017-03-06 18:33     ` Andrew Cooper
2017-03-06 18:39       ` George Dunlap [this message]
2017-03-07 12:57   ` George Dunlap
2017-03-01 16:24 ` [PATCH 0/7] Fixes to pagetable handling Jan Beulich
2017-03-01 16:32   ` Andrew Cooper
2017-03-06 16:42 ` [RFC XTF PATCH] Pagetable Emulation testing Andrew Cooper
2017-03-13 15:45   ` Jan Beulich
2017-03-13 17:48     ` Andrew Cooper
2017-03-14 11:17       ` 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=fef20bdf-f76b-a7fa-712d-04c848daf88d@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).