All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] x86/Xen: correct commentary and parameter naming of xen_exchange_memory()
Date: Wed, 1 Jul 2026 17:21:23 +0200	[thread overview]
Message-ID: <305e0bea-cea8-4260-be84-4e844979987f@suse.com> (raw)
In-Reply-To: <d2661f83-a97b-4fc7-bf52-25e99f63576b@suse.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1421 bytes --]

On 01.07.26 11:55, Jan Beulich wrote:
> As documented in comments in struct xen_memory_exchange, the input to the
> hypercall is a set of MFNs which are to be removed from the domain, plus a
> set of PFNs where the newly allocated MFNs are to appear. Present comment
> and parameter naming don't correctly reflect that.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Should "fns_out" maybe be "fns_inout" to further emphasize the dual
> purpose?

I think so, yes. And I'd like to have that reflected in the comment you are
modifying ...

> 
> --- a/arch/x86/xen/mmu_pv.c
> +++ b/arch/x86/xen/mmu_pv.c
> @@ -2291,18 +2291,19 @@ static void xen_remap_exchanged_ptes(uns
>   }
>   
>   /*
> - * Perform the hypercall to exchange a region of our pfns to point to
> - * memory with the required contiguous alignment.  Takes the pfns as
> - * input, and populates mfns as output.
> + * Perform the hypercall to exchange a region of our pages to point to memory
> + * with the required contiguous alignment.  Takes as input the mfns to trade
> + * in and the pfns where the new pages are to appear, and populates mfns as
> + * output.

... like:

   [...] Takes as input the mfns to trade in (mfns_in) and the pfns where the new
   pages are to appear (fns_inout), and populates mfns as output (fns_inout).

With that:

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      reply	other threads:[~2026-07-01 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  9:55 [PATCH] x86/Xen: correct commentary and parameter naming of xen_exchange_memory() Jan Beulich
2026-07-01 15:21 ` Jürgen Groß [this message]

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=305e0bea-cea8-4260-be84-4e844979987f@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.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.