From: Marc Zyngier <maz@kernel.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, will@kernel.org,
oliver.upton@linux.dev, alexandru.elisei@arm.com,
aneesh.kumar@kernel.org, steven.price@arm.com, tabba@google.com
Subject: Re: [PATCH kvmtool v4 15/15] arm64: smccc: Start sending PSCI to userspace
Date: Thu, 08 Jan 2026 14:14:08 +0000 [thread overview]
Message-ID: <86344gmbtb.wl-maz@kernel.org> (raw)
In-Reply-To: <20250930103130.197534-17-suzuki.poulose@arm.com>
On Tue, 30 Sep 2025 11:31:30 +0100,
Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>
> From: Oliver Upton <oliver.upton@linux.dev>
>
> kvmtool now has a PSCI implementation that complies with v1.0 of the
> specification. Use the SMCCC filter to start sending these calls out to
> userspace for further handling. While at it, shut the door on the
> legacy, KVM-specific v0.1 functions.
>
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> arm64/include/kvm/kvm-config-arch.h | 8 +++++--
> arm64/smccc.c | 37 +++++++++++++++++++++++++++++
> 2 files changed, 43 insertions(+), 2 deletions(-)
>
> diff --git a/arm64/include/kvm/kvm-config-arch.h b/arm64/include/kvm/kvm-config-arch.h
> index ee031f01..3158fadf 100644
> --- a/arm64/include/kvm/kvm-config-arch.h
> +++ b/arm64/include/kvm/kvm-config-arch.h
> @@ -15,6 +15,7 @@ struct kvm_config_arch {
> u64 fw_addr;
> unsigned int sve_max_vq;
> bool no_pvtime;
> + bool in_kernel_smccc;
> };
>
> int irqchip_parser(const struct option *opt, const char *arg, int unset);
> @@ -52,11 +53,14 @@ int sve_vl_parser(const struct option *opt, const char *arg, int unset);
> "Force virtio devices to use PCI as their default " \
> "transport (Deprecated: Use --virtio-transport " \
> "option instead)", virtio_transport_parser, kvm), \
> - OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip, \
> + OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip, \
> "[gicv2|gicv2m|gicv3|gicv3-its]", \
> "Type of interrupt controller to emulate in the guest", \
> irqchip_parser, NULL), \
> OPT_U64('\0', "firmware-address", &(cfg)->fw_addr, \
> - "Address where firmware should be loaded"),
> + "Address where firmware should be loaded"), \
> + OPT_BOOLEAN('\0', "in-kernel-smccc", &(cfg)->in_kernel_smccc, \
> + "Disable userspace handling of SMCCC, instead" \
> + " relying on the in-kernel implementation"),
>
nit: this really is about PSCI, not SMCCC. The fact that we use the
SMCCC interface to route PSCI calls is an implementation detail,
really. The other thing is that this is a change in default behaviour,
and I'd rather keep in-kernel PSCI to be the default, specially given
that this otherwise silently fails on old kernels.
To that effect, I'd suggest the following instead:
+ OPT_BOOLEAN('\0', "psci", &(cfg)->userspace_psci, \
+ "Request userspace handling of PSCI, instead" \
+ " relying on the in-kernel implementation"),
and the code modified accordingly.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-01-08 14:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 10:31 [PATCH kvmtool 00/15] arm64: Handle PSCI calls in userspace Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 01/15] Allow pausing the VM from vcpu thread Suzuki K Poulose
2026-01-08 14:19 ` Marc Zyngier
2025-09-30 10:31 ` [PATCH kvmtool v4 02/15] update_headers: arm64: Track psci.h for PSCI definitions Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 03/15] update headers: Linux v6.17-rc7 Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 04/15] Import arm-smccc.h from Linux 6.16-rc1 Suzuki K Poulose
2025-09-30 10:37 ` Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 04/15] Import arm-smccc.h from Linux 6.17-rc7 Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 05/15] arm64: Stash kvm_vcpu_init for later use Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 06/15] arm64: Use KVM_SET_MP_STATE ioctl to power off non-boot vCPUs Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 07/15] arm64: Expose ARM64_CORE_REG() for general use Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 08/15] arm64: Add support for finding vCPU for given MPIDR Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 09/15] arm64: Add skeleton implementation for PSCI Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 10/15] arm64: psci: Implement CPU_SUSPEND Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 11/15] arm64: psci: Implement CPU_ON Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 12/15] arm64: psci: Implement AFFINITY_INFO Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 13/15] arm64: psci: Implement MIGRATE_INFO_TYPE Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 14/15] arm64: psci: Implement SYSTEM_{OFF,RESET} Suzuki K Poulose
2025-09-30 10:31 ` [PATCH kvmtool v4 15/15] arm64: smccc: Start sending PSCI to userspace Suzuki K Poulose
2026-01-08 14:14 ` Marc Zyngier [this message]
2026-01-08 14:23 ` Suzuki K Poulose
2026-01-09 2:36 ` Aneesh Kumar K.V
2026-01-09 10:21 ` Suzuki K Poulose
2026-01-09 10:43 ` Aneesh Kumar K.V
2026-01-09 17:14 ` Suzuki K Poulose
2026-01-08 14:19 ` [PATCH kvmtool 00/15] arm64: Handle PSCI calls in userspace Marc Zyngier
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=86344gmbtb.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=aneesh.kumar@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=steven.price@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@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