All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: andrew.cooper3@citrix.com, Kevin Tian <kevin.tian@intel.com>,
	keir@xen.org, Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v2 1/2] x86/mm: Add information about faulted page's presence to npfec structure
Date: Fri, 18 Dec 2015 03:15:21 -0700	[thread overview]
Message-ID: <5673EAC902000078000C1127@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1450383771-3636-2-git-send-email-boris.ostrovsky@oracle.com>

>>> On 17.12.15 at 21:22, <boris.ostrovsky@oracle.com> wrote:
> This is provided explicitly in SVM and implicitly in VMX (when neither of
> the three EPT_EFFECTIVE_* bits is set).
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Retaining full context since you failed to Cc the VMX maintainers,
which I've no done.

Jan

> ---
>  xen/arch/x86/hvm/svm/svm.c |    3 ++-
>  xen/arch/x86/hvm/vmx/vmx.c |    5 ++++-
>  xen/include/xen/mm.h       |    1 +
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 0078100..a66d854 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1491,7 +1491,8 @@ static void svm_do_nested_pgfault(struct vcpu *v,
>      struct npfec npfec = {
>          .read_access = !(pfec & PFEC_insn_fetch),
>          .write_access = !!(pfec & PFEC_write_access),
> -        .insn_fetch = !!(pfec & PFEC_insn_fetch)
> +        .insn_fetch = !!(pfec & PFEC_insn_fetch),
> +        .present = !!(pfec & PFEC_page_present),
>      };
>  
>      /* These bits are mutually exclusive */
> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> index 2922673..7ea1882 100644
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -2746,7 +2746,10 @@ static void ept_handle_violation(unsigned long 
> qualification, paddr_t gpa)
>          .read_access = !!(qualification & EPT_READ_VIOLATION) ||
>                         !!(qualification & EPT_WRITE_VIOLATION),
>          .write_access = !!(qualification & EPT_WRITE_VIOLATION),
> -        .insn_fetch = !!(qualification & EPT_EXEC_VIOLATION)
> +        .insn_fetch = !!(qualification & EPT_EXEC_VIOLATION),
> +        .present = !!(qualification & (EPT_EFFECTIVE_READ |
> +                                       EPT_EFFECTIVE_WRITE |
> +                                       EPT_EFFECTIVE_EXEC))
>      };
>  
>      if ( tb_init_done )
> diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
> index 5d4b64b..a795dd6 100644
> --- a/xen/include/xen/mm.h
> +++ b/xen/include/xen/mm.h
> @@ -159,6 +159,7 @@ struct npfec {
>      unsigned int read_access:1;
>      unsigned int write_access:1;
>      unsigned int insn_fetch:1;
> +    unsigned int present:1;
>      unsigned int gla_valid:1;
>      unsigned int kind:2;  /* npfec_kind_t */
>  };
> -- 
> 1.7.1

  reply	other threads:[~2015-12-18 10:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 20:22 [PATCH v2 0/2] Support of RO MMCFG access for PVH/HVMlite dom0s Boris Ostrovsky
2015-12-17 20:22 ` [PATCH v2 1/2] x86/mm: Add information about faulted page's presence to npfec structure Boris Ostrovsky
2015-12-18 10:15   ` Jan Beulich [this message]
2015-12-20  6:49     ` Tian, Kevin
2015-12-17 20:22 ` [PATCH v2 2/2] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers Boris Ostrovsky
2015-12-18 10:28   ` Jan Beulich
2015-12-18 10:11 ` [PATCH v2 0/2] Support of RO MMCFG access for PVH/HVMlite dom0s Jan Beulich
2015-12-18 13:02   ` Andrew Cooper
2015-12-18 13:53     ` Boris Ostrovsky
2015-12-18 14:16       ` Jan Beulich
2015-12-18 14:30         ` Boris Ostrovsky
2015-12-18 14:36           ` 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=5673EAC902000078000C1127@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --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.