All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Julien Grall' <julien.grall@arm.com>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Julien Grall <julie.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Brian Woods <brian.woods@amd.com>
Subject: Re: [PATCH 8/8] xen: Swich parameter in get_page_from_gfn to use typesafe gfn
Date: Wed, 7 Nov 2018 09:24:30 +0000	[thread overview]
Message-ID: <45f3cb5c91af4f2b801b78e07bcc5164@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20181106191454.22143-9-julien.grall@arm.com>

> -----Original Message-----
> From: Julien Grall [mailto:julien.grall@arm.com]
> Sent: 06 November 2018 19:15
> To: sstabellini@kernel.org; xen-devel@lists.xenproject.org
> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>; Konrad
> Rzeszutek Wilk <konrad.wilk@oracle.com>; Tim (Xen.org) <tim@xen.org>; Wei
> Liu <wei.liu2@citrix.com>; Boris Ostrovsky <boris.ostrovsky@oracle.com>;
> Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>; Brian Woods
> <brian.woods@amd.com>; Paul Durrant <Paul.Durrant@citrix.com>; Jun
> Nakajima <jun.nakajima@intel.com>; Kevin Tian <kevin.tian@intel.com>;
> Julien Grall <julie.grall@arm.com>
> Subject: [PATCH 8/8] xen: Swich parameter in get_page_from_gfn to use
> typesafe gfn
> 
> No functional change intended.
> 
> Only reasonable clean-ups are done in this patch. The rest will use _gfn
> for the time being.
> 
> Signed-off-by: Julien Grall <julie.grall@arm.com>
> ---
>  xen/arch/arm/guestcopy.c             |  2 +-
>  xen/arch/arm/mm.c                    |  2 +-
>  xen/arch/x86/cpu/vpmu.c              |  2 +-
>  xen/arch/x86/domain.c                | 12 ++++++------
>  xen/arch/x86/domctl.c                |  6 +++---
>  xen/arch/x86/hvm/dm.c                |  2 +-
>  xen/arch/x86/hvm/domain.c            |  2 +-
>  xen/arch/x86/hvm/hvm.c               |  9 +++++----
>  xen/arch/x86/hvm/svm/svm.c           |  8 ++++----
>  xen/arch/x86/hvm/viridian/viridian.c | 24 ++++++++++++------------
>  xen/arch/x86/hvm/vmx/vmx.c           |  4 ++--
>  xen/arch/x86/hvm/vmx/vvmx.c          | 12 ++++++------
>  xen/arch/x86/mm.c                    | 24 ++++++++++++++----------
>  xen/arch/x86/mm/p2m.c                |  2 +-
>  xen/arch/x86/mm/shadow/hvm.c         |  6 +++---
>  xen/arch/x86/physdev.c               |  3 ++-
>  xen/arch/x86/pv/descriptor-tables.c  |  5 ++---
>  xen/arch/x86/pv/emul-priv-op.c       |  6 +++---
>  xen/arch/x86/pv/mm.c                 |  2 +-
>  xen/arch/x86/traps.c                 | 11 ++++++-----
>  xen/common/domain.c                  |  2 +-
>  xen/common/event_fifo.c              | 12 ++++++------
>  xen/common/memory.c                  |  4 ++--
>  xen/common/tmem_xen.c                |  2 +-
>  xen/include/asm-arm/p2m.h            |  6 +++---
>  xen/include/asm-x86/p2m.h            | 11 +++++++----
>  26 files changed, 95 insertions(+), 86 deletions(-)
> 
[snip]
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 5d00256aaa..a7419bd444 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -317,7 +317,7 @@ static int svm_vmcb_restore(struct vcpu *v, struct
> hvm_hw_cpu *c)
>      {
>          if ( c->cr0 & X86_CR0_PG )
>          {
> -            page = get_page_from_gfn(v->domain, c->cr3 >> PAGE_SHIFT,
> +            page = get_page_from_gfn(v->domain, gaddr_to_gfn(c->cr3),
>                                       NULL, P2M_ALLOC);
>              if ( !page )
>              {
> @@ -2412,9 +2412,9 @@ nsvm_get_nvmcb_page(struct vcpu *v, uint64_t
> vmcbaddr)
>          return NULL;
> 
>      /* Need to translate L1-GPA to MPA */
> -    page = get_page_from_gfn(v->domain,
> -                            nv->nv_vvmcxaddr >> PAGE_SHIFT,
> -                            &p2mt, P2M_ALLOC | P2M_UNSHARE);
> +    page = get_page_from_gfn(v->domain,
> +                             gaddr_to_gfn(nv->nv_vvmcxaddr >>
> PAGE_SHIFT),

Don't you need to lose the '>> PAGE_SHIFT' now?

  Paul

> +                             &p2mt, P2M_ALLOC | P2M_UNSHARE);
>      if ( !page )
>          return NULL;
> 

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

  parent reply	other threads:[~2018-11-07  9:24 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 19:14 [PATCH 0/8] xen/arm: Add xentrace support Julien Grall
2018-11-06 19:14 ` [PATCH 1/8] xen/page_alloc: Move get_pg_owner()/put_pg_owner() from x86 to common code Julien Grall
2018-11-07  9:28   ` Jan Beulich
2018-11-09 18:06     ` Julien Grall
2018-11-06 19:14 ` [PATCH 2/8] xen/arm: p2m: Introduce p2m_get_page_from_gfn Julien Grall
2018-11-15 13:31   ` Andrii Anisov
2018-11-15 13:35     ` Andrii Anisov
2018-11-15 15:22     ` Julien Grall
2018-12-20 11:20       ` Andrii Anisov
2018-11-06 19:14 ` [PATCH 3/8] xen/arm: Rename p2m_map_foreign to p2m_map_foreign_rw Julien Grall
2018-11-15 11:42   ` Andrii Anisov
2018-11-15 12:07     ` Julien Grall
2018-11-06 19:14 ` [PATCH 4/8] xen/arm: Add support for read-only foreign mappings Julien Grall
2018-11-15 11:33   ` Andrii Anisov
2018-11-15 11:40     ` Julien Grall
2018-11-15 12:02       ` Andrii Anisov
2018-11-15 12:09         ` Julien Grall
2018-11-15 13:19           ` Andrii Anisov
2018-11-15 15:05             ` Julien Grall
2018-11-15 18:44               ` Stefano Stabellini
2018-11-15 19:06                 ` Julien Grall
2018-11-15 19:48                   ` Stefano Stabellini
2018-11-15 20:20                     ` Julien Grall
2018-11-16  9:05                       ` Andrii Anisov
2018-11-16  8:37               ` Andrii Anisov
2018-11-20 15:27               ` Andrii Anisov
2018-12-20 11:21               ` Andrii Anisov
2018-11-06 19:14 ` [PATCH 5/8] xen/arm: Allow a privileged domain to map foreign page from DOMID_XEN Julien Grall
2018-11-15 13:45   ` Andrii Anisov
2018-11-06 19:14 ` [PATCH 6/8] xen/arm: Initialize trace buffer Julien Grall
2018-11-15 13:49   ` Andrii Anisov
2018-11-06 19:14 ` [PATCH 7/8] xenalyze: Build for Both ARM and x86 Platforms Julien Grall
2018-11-07 13:04   ` Wei Liu
2018-11-06 19:14 ` [PATCH 8/8] xen: Swich parameter in get_page_from_gfn to use typesafe gfn Julien Grall
2018-11-06 20:11   ` Andrew Cooper
2018-11-07  8:57     ` Paul Durrant
2018-11-07 13:08       ` Andrew Cooper
2018-11-07 13:08     ` Julien Grall
2018-11-07  9:24   ` Paul Durrant [this message]
2018-11-07 13:05     ` Julien Grall
2018-11-12 16:49   ` Andrii Anisov
2018-11-12 16:52     ` Julien Grall
2018-11-12 16:58       ` Andrii Anisov
2018-11-12 17:09         ` Julien Grall

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=45f3cb5c91af4f2b801b78e07bcc5164@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=brian.woods@amd.com \
    --cc=jbeulich@suse.com \
    --cc=julie.grall@arm.com \
    --cc=julien.grall@arm.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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 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.