From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 5/7] x86/shadow: Use the pagewalk reserved bits helpers
Date: Thu, 2 Mar 2017 14:32:17 +0000 [thread overview]
Message-ID: <ef791b69-e735-0be7-d7b0-d28f8c6b10ef@citrix.com> (raw)
In-Reply-To: <58B829EE020000780013F48F@prv-mh.provo.novell.com>
On 02/03/17 13:19, Jan Beulich wrote:
>>>> On 02.03.17 at 13:56, <andrew.cooper3@citrix.com> wrote:
>> On 02/03/17 12:51, Jan Beulich wrote:
>>>>>> On 02.03.17 at 13:26, <andrew.cooper3@citrix.com> wrote:
>>>> On 01/03/17 16:03, Jan Beulich wrote:
>>>>>>>> On 27.02.17 at 15:03, <andrew.cooper3@citrix.com> wrote:
>>>>>> The shadow logic should never create a shadow of a guest PTE which contains
>>>>>> reserved bits from the guests point of view. Such a shadowed entry might not
>>>>>> cause #PF[RSVD] when walked by hardware, thus won't behave architecturally
>>>>>> from the guests point of view.
>>>>> But are we already or-ing in the RSVD bit accordingly in such cases,
>>>>> before handing the #PF to the guest? The patch here certainly
>>>>> doesn't make any change towards that, afaics.
>>>> The purpose of this patch is to ensure we never create a shadow which
>>>> risks causing hardware to generate #PF[RSVD] when running on the
>>>> shadows, other than the one deliberate case (MMIO fastpath).
>>> Right, but instead of answering my question this emphasizes the
>>> need for an answer, as what you say basically means we'd never
>>> (except for that one special case) see the RSVD bit set when
>>> getting #PF handed by hardware, yet for forwarding to the guest
>>> we need to set that bit then in such cases.
>> This is intentional.
>>
>> We hand #PF[RSVD] back to the guest based on walking the guest
>> pagetables, rather than what we find from hardware walking the shadows
>> we create.
> Well, is that (always) the case here already, or only after patch 7? My
> question after all is whether this works as intended at this point.
I am probably going to defer to Tim on the historical details here.
Most paths to creating a new shadow follow a walk of the guest
pagetables, and reserved guest entries fall out there without creating
shadows.
However, there are definitely paths to creating shadows which don't pass
through a guest walk (probably the adjacent prefetches), and those paths
need protection from creating bad shadows.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-02 14:32 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 [this message]
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
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=ef791b69-e735-0be7-d7b0-d28f8c6b10ef@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.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).