xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Igor Druzhinin <igor.druzhinin@citrix.com>,
	wl@xen.org, Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/svm: retry after unhandled NPT fault if gfn was marked for recalculation
Date: Fri, 22 May 2020 15:32:59 +0200	[thread overview]
Message-ID: <20200522133259.GC54375@Air-de-Roger> (raw)
In-Reply-To: <ef3411ac-9e7c-0ef7-ad9f-c24f8ebf32a6@citrix.com>

On Fri, May 22, 2020 at 02:11:15PM +0100, Andrew Cooper wrote:
> On 22/05/2020 14:04, Jan Beulich wrote:
> > On 22.05.2020 13:11, Roger Pau Monné wrote:
> >> That being said, I also don't like the fact that logdity is handled
> >> differently between EPT and NPT, as on EPT it's handled as a
> >> misconfig while on NPT it's handled as a violation.
> > Because, well, there is no concept of misconfig in NPT.
> 
> Indeed.  Intel chose to split EPT errors into two - MISCONFIG for
> structural errors (not present, or reserved bits set) and VIOLATION for
> permissions errors.
> 
> AMD reused the same silicon pagewalker design, so have a single
> NPT_FAULT vmexit which behaves much more like a regular pagefault,
> encoding structural vs permission errors in the error code.

Maybe I should clarify, I understand that NPT doesn't have such
differentiation regarding nested page table faults vs EPT, but I feel
like it would be clearer if part of the code could be shared, ie:
unify EPT resolve_misconfig and NPT do_recalc into a single function
for example that uses the necessary p2m-> helpers for the differing
implementations. I think we should be able to tell apart when a NPT
page fault is a recalc one by looking at the bits in the EXITINFO1
error field?

Anyway, this was just a rant, and it's tangential to the issue at
hand, sorry for distracting.

Roger.


  reply	other threads:[~2020-05-22 13:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 21:43 [PATCH] x86/svm: retry after unhandled NPT fault if gfn was marked for recalculation Igor Druzhinin
2020-05-22  0:26 ` Igor Druzhinin
2020-05-22  9:45 ` Andrew Cooper
2020-05-22 10:05   ` Igor Druzhinin
2020-05-22 10:19     ` Andrew Cooper
2020-05-22 10:25       ` Igor Druzhinin
2020-05-22 13:34       ` Jan Beulich
2020-05-22 10:08 ` Roger Pau Monné
2020-05-22 10:14   ` Igor Druzhinin
2020-05-22 10:23     ` Roger Pau Monné
2020-05-22 10:27       ` Igor Druzhinin
2020-05-22 11:11         ` Roger Pau Monné
2020-05-22 13:04           ` Jan Beulich
2020-05-22 13:11             ` Andrew Cooper
2020-05-22 13:32               ` Roger Pau Monné [this message]
2020-05-22 15:53                 ` Andrew Cooper

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=20200522133259.GC54375@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=igor.druzhinin@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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).