From: Will Deacon <will@kernel.org>
To: Kameron Carr <kameroncarr@linux.microsoft.com>, aneesh.kumar@kernel.org
Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com, mhklinux@outlook.com,
catalin.marinas@arm.com, mark.rutland@arm.com,
lpieralisi@kernel.org, sudeep.holla@kernel.org, arnd@arndb.de,
thuth@redhat.com, linux-hyperv@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH v3 1/6] arm64: rsi: Add RSI host call structure and helper function
Date: Tue, 4 Aug 2026 14:25:42 +0100 [thread overview]
Message-ID: <anHoVr_PRkBHRGu3@willie-the-truck> (raw)
In-Reply-To: <20260721201148.1441143-2-kameroncarr@linux.microsoft.com>
On Tue, Jul 21, 2026 at 01:11:43PM -0700, Kameron Carr wrote:
> Add struct rsi_host_call to rsi_smc.h, which represents the host call
> data structure used by the Realm Management Monitor (RMM) for the
> RSI_HOST_CALL interface. The structure contains a 16-bit immediate field
> and 31 general-purpose register values, aligned to 256 bytes as required
> by the CCA RMM specification.
>
> Add rsi_host_call() static inline wrapper in rsi_cmds.h that invokes
> SMC_RSI_HOST_CALL with the physical address of the host call structure.
> This will be used by Hyper-V guest code to route hypercalls through the
> RSI interface when running inside an Arm CCA Realm.
>
> Signed-off-by: Kameron Carr <kameroncarr@linux.microsoft.com>
> ---
> arch/arm64/include/asm/rsi_cmds.h | 22 ++++++++++++++++++++++
> arch/arm64/include/asm/rsi_smc.h | 7 +++++++
> 2 files changed, 29 insertions(+)
>
> diff --git a/arch/arm64/include/asm/rsi_cmds.h b/arch/arm64/include/asm/rsi_cmds.h
> index 2c8763876dfb7..9daf8008e5da2 100644
> --- a/arch/arm64/include/asm/rsi_cmds.h
> +++ b/arch/arm64/include/asm/rsi_cmds.h
> @@ -88,6 +88,28 @@ static inline long rsi_set_addr_range_state(phys_addr_t start,
> return res.a0;
> }
>
> +/**
> + * rsi_host_call - Make a Host call.
> + * @host_call_struct: IPA of host call structure
> + *
> + * This call will fail if the IPA of the host call structure:
> + * * is not aligned to 256 bytes,
> + * * is not protected / encrypted,
> + * * is RIPAS_EMPTY
> + *
> + * Returns:
> + * On success, returns RSI_SUCCESS.
> + * Otherwise, returns an error code.
> + */
> +static inline unsigned long rsi_host_call(phys_addr_t host_call_struct)
> +{
> + struct arm_smccc_res res;
> +
> + arm_smccc_smc(SMC_RSI_HOST_CALL, host_call_struct, 0, 0, 0, 0, 0, 0,
> + &res);
> + return res.a0;
> +}
As I've mentioned to Aneesh on two occasions already [1][2], this code
should be moved out of arch/arm64 before we add anything else to it.
Thanks,
Will
[1] https://lore.kernel.org/r/agsNO9cc7H-b0H8L@willie-the-truck
[2] https://lore.kernel.org/r/al_svOwkb5SleTWg@willie-the-truck
next prev parent reply other threads:[~2026-08-04 13:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 20:11 [PATCH v3 0/6] arm64: hyperv: Add Realm support for Hyper-V Kameron Carr
2026-07-21 20:11 ` [PATCH v3 1/6] arm64: rsi: Add RSI host call structure and helper function Kameron Carr
2026-07-21 20:22 ` sashiko-bot
2026-08-04 13:25 ` Will Deacon [this message]
2026-07-21 20:11 ` [PATCH v3 2/6] firmware: smccc: Detect hypervisor via RSI host call in CCA Realms Kameron Carr
2026-07-21 20:24 ` sashiko-bot
2026-07-21 20:11 ` [PATCH v3 3/6] arm64: hyperv: Add per-CPU RSI host call infrastructure for " Kameron Carr
2026-07-21 20:25 ` sashiko-bot
2026-07-21 20:11 ` [PATCH v3 4/6] Drivers: hv: Mark shared memory as decrypted " Kameron Carr
2026-07-21 20:24 ` sashiko-bot
2026-07-21 20:11 ` [PATCH v3 5/6] arm64: hyperv: Route hypercalls through RSI host call in " Kameron Carr
2026-07-21 20:27 ` sashiko-bot
2026-07-21 20:11 ` [PATCH v3 6/6] arm64: hyperv: Implement hv_is_isolation_supported() for " Kameron Carr
2026-07-23 16:26 ` [PATCH v3 0/6] arm64: hyperv: Add Realm support for Hyper-V Michael Kelley
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=anHoVr_PRkBHRGu3@willie-the-truck \
--to=will@kernel.org \
--cc=aneesh.kumar@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kameroncarr@linux.microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhklinux@outlook.com \
--cc=sudeep.holla@kernel.org \
--cc=thuth@redhat.com \
--cc=wei.liu@kernel.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