All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Steven Price" <steven.price@arm.com>
Cc: "Marc Zyngier" <maz@kernel.org>,
	"Oliver Upton" <oupton@kernel.org>,
	kvmarm@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH 1/6] firmware: arm_rmm: Add SMC definitions for calling the RMM
Date: Wed, 15 Jul 2026 14:38:04 +0000	[thread overview]
Message-ID: <20260715143804.ADDF41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715142739.80398-2-steven.price@arm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] `struct rec_exit` contains 4 bytes of implicit compiler padding between `padding9` and `plane`.
- [Low] Discrepancy between the `PROT_MAP` macro prefix and the `DATA_MAP` comment and SMC command name.
--

--- Patch [1]: [PATCH 1/6] firmware: arm_rmm: Add SMC definitions for calling the RMM ---
commit c161f24da1669945cb4dc961f3a3c4ef452450b6
Author: Steven Price <steven.price@arm.com>
firmware: arm_rmm: Add SMC definitions for calling the RMM

The RMM (Realm Management Monitor) provides functionality that can be
accessed by SMC calls from the host.

> diff --git a/include/linux/arm-smccc-rmi.h b/include/linux/arm-smccc-rmi.h
> new file mode 100644
> index 0000000000000..c965e8867518f
> --- /dev/null
> +++ b/include/linux/arm-smccc-rmi.h

[ ... ]

> +	union { /* 0x600 */
> +		struct {
> +			u16 imm;
> +			u16 padding9;
> +			u64 plane;

[Severity: Low]
Does this struct layout contain implicit padding? The sequence of two u16
fields followed by a u64 field forces the compiler to inject 4 bytes of
padding to align the plane field to an 8-byte boundary. While deterministic
on ARM64, implicit padding in ABI structures shared with firmware is usually
avoided. Should an explicit 32-bit padding field be added here?

> +		};
> +		u8 padding6[0x100];
> +	};

[ ... ]

> +/* RMI_RTT_DATA_MAP_FLAGS definitions */
> +#define RMI_RTT_PROT_MAP_FLAGS_OADDR_TYPE	GENMASK(1, 0)
> +#define RMI_RTT_PROT_MAP_FLAGS_LIST_COUNT	GENMASK(15, 2)

[Severity: Low]
This isn't a bug, but there seems to be a naming discrepancy. The comment
mentions RMI_RTT_DATA_MAP_FLAGS, which corresponds to the
SMC_RMI_RTT_DATA_MAP command, but the macros are prefixed with
RMI_RTT_PROT_MAP_FLAGS. Should these macros use the DATA_MAP prefix instead?

> +
> +/* S2AP Direct Encodings, used in RMI_RTT_UNPROT_MAP_FLAGS_S2AP */
> +#define RMI_S2AP_DIRECT_WRITE			BIT(0)
> +#define RMI_S2AP_DIRECT_READ			BIT(1)
> +
> +#endif /* __LINUX_ARM_SMCCC_RMI_H_ */

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715142739.80398-1-steven.price@arm.com?part=1

  reply	other threads:[~2026-07-15 14:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 14:27 [PATCH 0/6] firmware: arm_rmm: Add RMM v2.0 support Steven Price
2026-07-15 14:27 ` [PATCH 1/6] firmware: arm_rmm: Add SMC definitions for calling the RMM Steven Price
2026-07-15 14:38   ` sashiko-bot [this message]
2026-07-15 14:27 ` [PATCH 2/6] firmware: arm_rmm: Add wrappers for direct RMI calls Steven Price
2026-07-15 14:49   ` sashiko-bot
2026-07-15 14:27 ` [PATCH 3/6] firmware: arm_rmm: Check for RMI support at init Steven Price
2026-07-15 15:06   ` sashiko-bot
2026-07-15 14:27 ` [PATCH 4/6] firmware: arm_rmm: Configure the RMM with the host's page size Steven Price
2026-07-15 15:18   ` sashiko-bot
2026-07-15 14:27 ` [PATCH 5/6] firmware: arm_rmm: Add support for SRO Steven Price
2026-07-15 15:29   ` sashiko-bot
2026-07-15 14:27 ` [PATCH 6/6] firmware: arm_rmm: Ensure the RMM has GPT entries for memory Steven Price
2026-07-15 15:47   ` sashiko-bot

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=20260715143804.ADDF41F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=steven.price@arm.com \
    /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.