xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Julien Grall <julien.grall@arm.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
	sstabellini@kernel.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 08/16] xen/arm: livepatch: Redefine virt_to_mfn to support typesafe
Date: Mon, 19 Jun 2017 13:06:11 -0400	[thread overview]
Message-ID: <20170619170611.GC16845@char.us.oracle.com> (raw)
In-Reply-To: <20170619165753.25049-9-julien.grall@arm.com>

On Mon, Jun 19, 2017 at 05:57:45PM +0100, Julien Grall wrote:
> The file xen/arch/arm/livepatch.c is using typesafe MFN in most of
> the place. The only caller to virt_to_mfn is using with _mfn(...).
> 
> To avoid extra _mfn(...), re-define virt_to_mfn within
> xen/arch/arm/livepatch.c to handle typesafe MFN.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> ---
> 
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
>     Changes in v2:
>         - Add Stefano's reviewed-by
>         - Still missing an ack from Konrad and/or Ross.
> ---
>  xen/arch/arm/livepatch.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
> index de95e54744..3e53524365 100644
> --- a/xen/arch/arm/livepatch.c
> +++ b/xen/arch/arm/livepatch.c
> @@ -12,6 +12,10 @@
>  #include <asm/livepatch.h>
>  #include <asm/mm.h>
>  
> +/* Override macros from asm/page.h to make them work with mfn_t */
> +#undef virt_to_mfn
> +#define virt_to_mfn(va) _mfn(__virt_to_mfn(va))
> +
>  void *vmap_of_xen_text;
>  
>  int arch_livepatch_quiesce(void)
> @@ -22,7 +26,7 @@ int arch_livepatch_quiesce(void)
>      if ( vmap_of_xen_text )
>          return -EINVAL;
>  
> -    text_mfn = _mfn(virt_to_mfn(_start));
> +    text_mfn = virt_to_mfn(_start);
>      text_order = get_order_from_bytes(_end - _start);
>  
>      /*
> -- 
> 2.11.0
> 

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

  reply	other threads:[~2017-06-19 17:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 16:57 [PATCH v2 00/16] xen/arm: Clean-up memory subsystems Julien Grall
2017-06-19 16:57 ` [PATCH v2 01/16] xen/mm: Don't use _{g, m}fn for defining INVALID_{G, M}FN Julien Grall
2017-06-20  7:32   ` Jan Beulich
2017-06-20  9:14     ` Tim Deegan
2017-06-20  9:36       ` Jan Beulich
2017-06-20 10:06         ` Tim Deegan
2017-06-20 10:32           ` Jan Beulich
2017-06-22 18:31             ` Julien Grall
2017-06-23  8:30               ` Jan Beulich
2017-06-23  8:41                 ` Julien Grall
2017-06-23  8:58                   ` Tim Deegan
2017-06-23  9:01                     ` Julien Grall
2017-06-23  9:02                     ` Tim Deegan
2017-06-23  9:09                   ` Jan Beulich
2017-06-23  8:55                 ` Julien Grall
2017-06-23  9:18                   ` Jan Beulich
2017-06-23  9:24                     ` Tim Deegan
2017-06-23  9:31                       ` Jan Beulich
2017-06-26 13:11                         ` Julien Grall
2017-06-19 16:57 ` [PATCH v2 02/16] xen/arm: setup: Remove bogus xenheap_mfn_end in setup_mm for arm64 Julien Grall
2017-06-22  0:03   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 03/16] xen/arm: mm: Use typesafe mfn for xenheap_mfn_* Julien Grall
2017-06-21 23:58   ` Stefano Stabellini
2017-06-22  0:27     ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 04/16] xen/arm: p2m: Redefine mfn_to_page and page_to_mfn to use typesafe Julien Grall
2017-06-22  0:00   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 05/16] xen/arm: mm: Redefine virt_to_mfn to support typesafe Julien Grall
2017-06-22  0:01   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 06/16] xen/arm: domain_build: " Julien Grall
2017-06-19 16:57 ` [PATCH v2 07/16] xen/arm: alternative: " Julien Grall
2017-06-19 16:57 ` [PATCH v2 08/16] xen/arm: livepatch: " Julien Grall
2017-06-19 17:06   ` Konrad Rzeszutek Wilk [this message]
2017-06-19 16:57 ` [PATCH v2 09/16] xen/arm: create_xen_entries: Use typesafe MFN Julien Grall
2017-06-19 16:57 ` [PATCH v2 10/16] xen/arm: Move LPAE definition in a separate header Julien Grall
2017-06-19 16:57 ` [PATCH v2 11/16] xen/arm: lpae: Fix comments coding style Julien Grall
2017-06-22  0:04   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 12/16] xen/arm: p2m: Rename p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage Julien Grall
2017-06-20  8:14   ` Andrew Cooper
2017-06-21 13:34     ` Julien Grall
2017-06-22  0:08       ` Stefano Stabellini
2017-06-22  0:09   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 13/16] xen/arm: p2m: Move lpae_* helpers in lpae.h Julien Grall
2017-06-22  0:10   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 14/16] xen/arm: mm: Use lpae_valid and lpae_table in create_xen_entries Julien Grall
2017-06-22  0:14   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 15/16] xen/arm: mm: Introduce temporary variable " Julien Grall
2017-06-22  0:17   ` Stefano Stabellini
2017-06-19 16:57 ` [PATCH v2 16/16] xen/arm: mm: Use __func__ rather than plain name in format string Julien Grall
2017-06-22  0:18   ` Stefano Stabellini

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=20170619170611.GC16845@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=julien.grall@arm.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=sstabellini@kernel.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).