From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86/P2M: correct type use in p2m_put_gfn()
Date: Wed, 4 Feb 2026 08:35:38 +0100 [thread overview]
Message-ID: <aYL2yt0g8HGdpOTA@Mac.lan> (raw)
In-Reply-To: <1ecefc98-f1c2-4116-95bf-a86c3b066843@suse.com>
On Tue, Feb 03, 2026 at 03:01:27PM +0100, Jan Beulich wrote:
> Everywhere else gfn_t are passed into respective GFN locking macros: Do so
> here as well.
>
> Amends: 819cdc5a7301 ("x86/p2m: re-arrange {,__}put_gfn()")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Easy to spot by adding ASSERT(!gfn_eq(g, INVALID_GFN)) to the respective
> macros. While imo that should be a correct thing to do (as with
> hypothetical split locks a valid GFN would really need passing in, in
> order to be able to figure out which lock to use), we can't do so right
> now: The lock is acquired ahead of respective checking in a number of
> places, e.g. in p2m_get_gfn_type_access().
Could we convert those macros into static inlines? It's dangerous to
use macros like those when the parameters are dropped, as the
parameter is not evaluated at all.
Thanks, Roger.
next prev parent reply other threads:[~2026-02-04 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 14:01 [PATCH] x86/P2M: correct type use in p2m_put_gfn() Jan Beulich
2026-02-04 7:35 ` Roger Pau Monné [this message]
2026-02-04 7:49 ` Jan Beulich
2026-02-04 7:54 ` Roger Pau Monné
2026-02-04 8:00 ` 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=aYL2yt0g8HGdpOTA@Mac.lan \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.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.