From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Jan Beulich" <JBeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Shawn Anastasio" <sanastasio@raptorengineering.com>
Subject: Re: [PATCH v5 1/3] xen/mm: Introduce mm-types.h
Date: Fri, 25 Apr 2025 13:29:01 +0200 [thread overview]
Message-ID: <b2883538-8cea-4fde-b42b-55455fa810ca@gmail.com> (raw)
In-Reply-To: <20250425112415.245585-2-andrew.cooper3@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
On 4/25/25 1:24 PM, Andrew Cooper wrote:
> The type used for pagetable attributes/permissions is currently unsigned int,
> but needs to become architecture dependent as PPC needs unsigned long.
Not only PPC, RISC-V needs it too.
>
> Introduce mm-types.h to house pte_attr_t.
Do we really want a separate mm-types.h?
If yes then:
Reviewed-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>
~ Oleksii
>
> Given the new toolchain baseline, we can use __has_include() now to remove the
> need for boilerplate on most architectures.
>
> Signed-off-by: Andrew Cooper<andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich<JBeulich@suse.com>
> CC: Roger Pau Monné<roger.pau@citrix.com>
> CC: Stefano Stabellini<sstabellini@kernel.org>
> CC: Julien Grall<julien@xen.org>
> CC: Volodymyr Babchuk<Volodymyr_Babchuk@epam.com>
> CC: Bertrand Marquis<bertrand.marquis@arm.com>
> CC: Michal Orzel<michal.orzel@amd.com>
> CC: Oleksii Kurochko<oleksii.kurochko@gmail.com>
> CC: Shawn Anastasio<sanastasio@raptorengineering.com>
>
> __has_include() was one of the justifications for the new toolchain baseline,
> and is included inhttps://gitlab.com/xen-project/xen/-/issues/201
> ---
> xen/include/xen/mm-types.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> create mode 100644 xen/include/xen/mm-types.h
>
> diff --git a/xen/include/xen/mm-types.h b/xen/include/xen/mm-types.h
> new file mode 100644
> index 000000000000..19f692e9aaa4
> --- /dev/null
> +++ b/xen/include/xen/mm-types.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef XEN_MM_TYPES_H
> +#define XEN_MM_TYPES_H
> +
> +/*
> + * Types used to abstract away architecture-specific details in the memory
> + * management code.
> + *
> + * Architectures need only provide their own asm/mm-types.h if they want to
> + * override the defaults given here.
> + */
> +#if __has_include(<asm/mm-types.h>)
> +# include <asm/mm-types.h>
> +#else /* !__has_include(<asm/mm-types.h>) */
> +
> +typedef unsigned int pte_attr_t;
> +
> +#endif /* !__has_include(<asm/mm-types.h>) */
> +#endif /* XEN_MM_TYPES_H */
[-- Attachment #2: Type: text/html, Size: 3743 bytes --]
next prev parent reply other threads:[~2025-04-25 11:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 11:24 [PATCH v5 0/3] xen/mm: Introduce pte_attr_t Andrew Cooper
2025-04-25 11:24 ` [PATCH v5 1/3] xen/mm: Introduce mm-types.h Andrew Cooper
2025-04-25 11:29 ` Oleksii Kurochko [this message]
2025-04-25 12:45 ` Jan Beulich
2025-04-25 12:49 ` Andrew Cooper
2025-04-25 12:48 ` Jan Beulich
2025-04-25 13:05 ` Andrew Cooper
2025-04-25 13:13 ` Jan Beulich
2025-04-25 13:48 ` Andrew Cooper
2025-04-25 14:42 ` Jan Beulich
2025-05-01 19:42 ` Stefano Stabellini
2025-04-25 11:24 ` [PATCH v5 2/3] xen/mm: Switch some APIs over to pte_attr_t Andrew Cooper
2025-04-25 11:33 ` Oleksii Kurochko
2025-05-01 19:42 ` Stefano Stabellini
2025-04-25 11:24 ` [PATCH v5 3/3] ppc/mm: Introduce mm-types.h Andrew Cooper
2025-04-25 11:37 ` Oleksii Kurochko
2025-04-25 11:39 ` Andrew Cooper
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=b2883538-8cea-4fde-b42b-55455fa810ca@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=JBeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sanastasio@raptorengineering.com \
--cc=sstabellini@kernel.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 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.