qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/5] target/arm: Handle psci calls in userspace
@ 2023-06-26  6:49 Shaoqin Huang
  2023-06-26  6:49 ` [PATCH v1 1/5] linux-headers: Update to v6.4-rc7 Shaoqin Huang
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Shaoqin Huang @ 2023-06-26  6:49 UTC (permalink / raw)
  To: qemu-devel, qemu-arm
  Cc: oliver.upton, salil.mehta, james.morse, gshan, Shaoqin Huang,
	Cornelia Huck, kvm, Michael S. Tsirkin, Paolo Bonzini,
	Peter Maydell

The userspace SMCCC call filtering[1] provides the ability to forward the SMCCC
calls to the userspace. The vCPU hotplug[2] would be the first legitimate use
case to handle the psci calls in userspace, thus the vCPU hotplug can deny the
PSCI_ON call if the vCPU is not present now.

This series try to enable the userspace SMCCC call filtering, thus can handle
the SMCCC call in userspace. The first enabled SMCCC call is psci call, by using
the new added option 'user-smccc', we can enable handle psci calls in userspace.

qemu-system-aarch64 -machine virt,user-smccc=on

This series reuse the qemu implementation of the psci handling, thus the
handling process is very simple. But when handling psci in userspace when using
kvm, the reset vcpu process need to be taking care, the detail is included in
the patch05.

[1] lore.kernel.org/20230404154050.2270077-1-oliver.upton@linux.dev
[2] lore.kernel.org/20230203135043.409192-1-james.morse@arm.com

Shaoqin Huang (5):
  linux-headers: Update to v6.4-rc7
  linux-headers: Import arm-smccc.h from Linux v6.4-rc7
  target/arm: make psci call can be used by kvm
  arm/kvm: add skeleton implementation for userspace SMCCC call handling
  arm/kvm: add support for userspace psci calls handling

 docs/system/arm/virt.rst                      |   4 +
 hw/arm/virt.c                                 |  21 ++
 hw/intc/arm_gicv3_kvm.c                       |  10 +
 include/hw/arm/virt.h                         |   1 +
 include/standard-headers/linux/const.h        |   2 +-
 include/standard-headers/linux/virtio_blk.h   |  18 +-
 .../standard-headers/linux/virtio_config.h    |   6 +
 include/standard-headers/linux/virtio_net.h   |   1 +
 linux-headers/asm-arm64/kvm.h                 |  33 +++
 linux-headers/asm-riscv/kvm.h                 |  53 +++-
 linux-headers/asm-riscv/unistd.h              |   9 +
 linux-headers/asm-s390/unistd_32.h            |   1 +
 linux-headers/asm-s390/unistd_64.h            |   1 +
 linux-headers/asm-x86/kvm.h                   |   3 +
 linux-headers/linux/arm-smccc.h               | 240 ++++++++++++++++++
 linux-headers/linux/const.h                   |   2 +-
 linux-headers/linux/kvm.h                     |  12 +-
 linux-headers/linux/psp-sev.h                 |   7 +
 linux-headers/linux/userfaultfd.h             |  17 +-
 target/arm/helper.c                           |   3 +-
 target/arm/kvm.c                              | 146 +++++++++++
 21 files changed, 573 insertions(+), 17 deletions(-)
 create mode 100644 linux-headers/linux/arm-smccc.h

base-commit: e3660cc1e3cb136af50c0eaaeac27943c2438d1d
-- 
2.39.1



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-13  0:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26  6:49 [PATCH v1 0/5] target/arm: Handle psci calls in userspace Shaoqin Huang
2023-06-26  6:49 ` [PATCH v1 1/5] linux-headers: Update to v6.4-rc7 Shaoqin Huang
2023-06-26  6:49 ` [PATCH v1 2/5] linux-headers: Import arm-smccc.h from Linux v6.4-rc7 Shaoqin Huang
2023-07-04  9:05   ` Cornelia Huck
2023-06-26  6:49 ` [PATCH v1 3/5] target/arm: make psci call can be used by kvm Shaoqin Huang
2023-06-26  6:49 ` [PATCH v1 4/5] arm/kvm: add skeleton implementation for userspace SMCCC call handling Shaoqin Huang
2023-07-04  9:17   ` Cornelia Huck
2023-06-26  6:49 ` [PATCH v1 5/5] arm/kvm: add support for userspace psci calls handling Shaoqin Huang
2023-06-26 13:42 ` [PATCH v1 0/5] target/arm: Handle psci calls in userspace Salil Mehta via
2023-06-27  2:34   ` Shaoqin Huang
2023-07-04  9:58     ` Salil Mehta via
2023-07-13  0:27       ` Gavin Shan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).