xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Hongyan Xia <hx242@xen.org>
Cc: xen-devel@lists.xenproject.org,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>
Subject: Re: [PATCH 2/5] x86_64/mm: map and unmap page tables in m2p_mapped
Date: Wed, 1 Apr 2020 14:19:34 +0200	[thread overview]
Message-ID: <a83f4eb5-e151-35a5-7e53-d6609c3fcb82@suse.com> (raw)
In-Reply-To: <9b46a0bae03107fcb192e6590234b9e882965f11.1584955616.git.hongyxia@amazon.com>

On 23.03.2020 10:41, Hongyan Xia wrote:
> --- a/xen/arch/x86/x86_64/mm.c
> +++ b/xen/arch/x86/x86_64/mm.c
> @@ -131,27 +131,33 @@ static int m2p_mapped(unsigned long spfn)
>      unsigned long va;
>      l3_pgentry_t *l3_ro_mpt;
>      l2_pgentry_t *l2_ro_mpt;
> +    int rc = M2P_NO_MAPPED;
>  
>      va = RO_MPT_VIRT_START + spfn * sizeof(*machine_to_phys_mapping);
> -    l3_ro_mpt = l4e_to_l3e(idle_pg_table[l4_table_offset(va)]);
> +    l3_ro_mpt = map_l3t_from_l4e(idle_pg_table[l4_table_offset(va)]);

Along the lines of what I've said for patch 1 - read the l3e
here and unmap again right away. No need for converting
"return" to "goto" further down. Same for the l2e then.

Jan


  reply	other threads:[~2020-04-01 12:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  9:41 [Xen-devel] [PATCH 0/5] use new API for Xen page tables Hongyan Xia
2020-03-23  9:41 ` [Xen-devel] [PATCH 1/5] x86/shim: map and unmap page tables in replace_va_mapping Hongyan Xia
2020-04-01 12:11   ` Jan Beulich
2020-03-23  9:41 ` [Xen-devel] [PATCH 2/5] x86_64/mm: map and unmap page tables in m2p_mapped Hongyan Xia
2020-04-01 12:19   ` Jan Beulich [this message]
2020-03-23  9:41 ` [Xen-devel] [PATCH 3/5] x86_64/mm: map and unmap page tables in share_hotadd_m2p_table Hongyan Xia
2020-04-01 12:29   ` Jan Beulich
2020-04-07 15:11     ` Hongyan Xia
2020-04-07 15:14       ` Jan Beulich
2020-04-08  9:32     ` Hongyan Xia
2020-03-23  9:41 ` [Xen-devel] [PATCH 4/5] x86_64/mm: map and unmap page tables in destroy_compat_m2p_mapping Hongyan Xia
2020-03-23  9:41 ` [Xen-devel] [PATCH 5/5] x86_64/mm: map and unmap page tables in destroy_m2p_mapping Hongyan Xia
2020-04-01 12:40   ` Jan Beulich
2020-04-07 16:23     ` Hongyan Xia
2020-03-29 15:06 ` [Xen-devel] [PATCH 0/5] use new API for Xen page tables Wei Liu
2020-03-30  8:25   ` Hongyan Xia
2020-04-06  8:27 ` Hongyan Xia
2020-04-06 11:03   ` Jan Beulich
2020-04-07 14:28     ` Hongyan Xia

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=a83f4eb5-e151-35a5-7e53-d6609c3fcb82@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=hx242@xen.org \
    --cc=roger.pau@citrix.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).