|
|
Log in / Subscribe / Register

kvmtool: arm64: Handle PSCI calls in userspace

From:  Suzuki K Poulose <suzuki.poulose-AT-arm.com>
To:  kvmarm-AT-lists.linux.dev, will-AT-kernel.org
Subject:  [PATCH v7 00/17] kvmtool: arm64: Handle PSCI calls in userspace
Date:  Mon, 30 Mar 2026 15:23:17 +0100
Message-ID:  <20260330142334.3309961-1-suzuki.poulose@arm.com>
Cc:  kvm-AT-vger.kernel.org, alexandru.elisei-AT-arm.com, oupton-AT-kernel.org, maz-AT-kernel.org, tabba-AT-google.com, aneesh.kumar-AT-kernel.org, linux-kernel-AT-vger.kernel.org, Suzuki K Poulose <suzuki.poulose-AT-arm.com>
Archive-link:  Article


This is version 7 of the patch series, originally posted by Oliver [0].

Use SMCCC filtering capability in to handle PSCI calls in the userspace.

Changes since v7:
 Link: https://lkml.kernel.org/r/20260227165624.1519865-1-suzuki...
 - Drop linux/const.h from the list of headers updated. Retain, one time update
   to fix the build break.

Changes since v5:
Link: https://lkml.kernel.org/r/20260108175753.1292097-1-suzuki...
 - Fix build break by importing linux/const.h from Linux UAP headers
 - Clean up the util/update_headers, issue warning for missing files.
 - Fix the psci.h source to Linux UAPI headers.
 - Rebased to Linux headers v6.19 (to match the tip of the tree)

Changes since v4:
Link: https://lkml.kernel.org/r/20250930103130.197534-1-suzuki....

 - Update headers to v6.18
 - Remove duplicate assignment of pause_req_cpu (Marc)
 - Flip the command line to opt in for PSCI in userspace, retaining default
   in kernel handling. (Marc)
 - Collect Review from Marc, thanks!

Changes since v3:
 - Address Will's comment on the race between pause/resume - Patch 1
 - Rebase on to v6.17-rc7
 - Drop importing cputype.h, which was not used by the series

[0] https://lore.kernel.org/all/20230802234255.466782-1-olive...

Oliver Upton (12):
  Import arm-smccc.h from Linux v6.19
  arm64: Stash kvm_vcpu_init for later use
  arm64: Use KVM_SET_MP_STATE ioctl to power off non-boot vCPUs
  arm64: Expose ARM64_CORE_REG() for general use
  arm64: Add support for finding vCPU for given MPIDR
  arm64: Add skeleton implementation for PSCI
  arm64: psci: Implement CPU_SUSPEND
  arm64: psci: Implement CPU_ON
  arm64: psci: Implement AFFINITY_INFO
  arm64: psci: Implement MIGRATE_INFO_TYPE
  arm64: psci: Implement SYSTEM_{OFF,RESET}
  arm64: smccc: Start sending PSCI to userspace

Suzuki K Poulose (5):
  headers: Update linux/const.h from linux sources
  util/update_headers: Clean up header copying
  util/update_headers: Warn about missing header files
  update_headers: arm64: Track uapi/linux/psci.h for PSCI definitions
  arm64: Sync headers from Linux v6.19 for psci.h

 Makefile                            |   2 +
 arm64/include/asm/smccc.h           |  65 ++++++
 arm64/include/kvm/kvm-arch.h        |   2 +
 arm64/include/kvm/kvm-config-arch.h |   8 +-
 arm64/include/kvm/kvm-cpu-arch.h    |  30 ++-
 arm64/kvm-cpu.c                     |  51 +++--
 arm64/kvm.c                         |  20 ++
 arm64/psci.c                        | 207 +++++++++++++++++++
 arm64/smccc.c                       |  81 ++++++++
 include/linux/arm-smccc.h           | 305 ++++++++++++++++++++++++++++
 include/linux/const.h               |  53 +++++
 include/linux/kernel.h              |   3 -
 include/linux/psci.h                |  52 +++++
 kvm-cpu.c                           |  13 ++
 util/update_headers.sh              |  23 ++-
 15 files changed, 874 insertions(+), 41 deletions(-)
 create mode 100644 arm64/include/asm/smccc.h
 create mode 100644 arm64/psci.c
 create mode 100644 arm64/smccc.c
 create mode 100644 include/linux/arm-smccc.h
 create mode 100644 include/linux/const.h

-- 
2.43.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds