All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] KVM: arm64: Pass PSCI to userspace
@ 2021-06-08 15:48 ` Jean-Philippe Brucker
  0 siblings, 0 replies; 58+ messages in thread
From: Jean-Philippe Brucker @ 2021-06-08 15:48 UTC (permalink / raw)
  To: maz
  Cc: kvm, kvmarm, linux-arm-kernel, linux-kernel, pbonzini, corbet,
	james.morse, alexandru.elisei, suzuki.poulose, catalin.marinas,
	will, lorenzo.pieralisi, salil.mehta, shameerali.kolothum.thodi,
	jonathan.cameron, Jean-Philippe Brucker

Allow userspace to request handling PSCI calls from guests. Our goal is
to enable a vCPU hot-add solution for Arm where the VMM presents
possible resources to the guest at boot, and controls which vCPUs can be
brought up by allowing or denying PSCI CPU_ON calls. Passing HVC and
PSCI to userspace has been discussed on the list in the context of vCPU
hot-add [1,2] but it can also be useful for implementing other SMCCC and
vendor hypercalls [3,4,5].

Patches 1-3 allow userspace to request WFI to be executed in KVM. That
way the VMM can easily implement the PSCI CPU_SUSPEND function, which is
mandatory from PSCI v0.2 onwards (even if it doesn't have a more useful
implementation than WFI, natively available to the guest).

Patch 4 lets userspace request any HVC that isn't handled by KVM, and
patch 5 lets userspace request PSCI calls, disabling in-kernel PSCI
handling.

I'm focusing on the PSCI bits, but a complete prototype of vCPU hot-add
for arm64 on Linux and QEMU, most of it from Salil and James, is
available at [6].

[1] https://lore.kernel.org/kvmarm/82879258-46a7-a6e9-ee54-fc3692c1cdc3@arm.com/
[2] https://lore.kernel.org/linux-arm-kernel/20200625133757.22332-1-salil.mehta@huawei.com/
    (Followed by KVM forum and Linaro Open discussions)
[3] https://lore.kernel.org/linux-arm-kernel/f56cf420-affc-35f0-2355-801a924b8a35@arm.com/
[4] https://lore.kernel.org/kvm/bf7e83f1-c58e-8d65-edd0-d08f27b8b766@arm.com/
[5] https://lore.kernel.org/kvm/1569338454-26202-2-git-send-email-guoheyi@huawei.com/
[6] https://jpbrucker.net/git/linux/log/?h=cpuhp/devel
    https://jpbrucker.net/git/qemu/log/?h=cpuhp/devel    

Jean-Philippe Brucker (5):
  KVM: arm64: Replace power_off with mp_state in struct kvm_vcpu_arch
  KVM: arm64: Move WFI execution to check_vcpu_requests()
  KVM: arm64: Allow userspace to request WFI
  KVM: arm64: Pass hypercalls to userspace
  KVM: arm64: Pass PSCI calls to userspace

 Documentation/virt/kvm/api.rst      | 46 +++++++++++++++----
 Documentation/virt/kvm/arm/psci.rst |  1 +
 arch/arm64/include/asm/kvm_host.h   | 10 +++-
 include/kvm/arm_hypercalls.h        |  1 +
 include/kvm/arm_psci.h              |  4 ++
 include/uapi/linux/kvm.h            |  3 ++
 arch/arm64/kvm/arm.c                | 71 +++++++++++++++++++++--------
 arch/arm64/kvm/handle_exit.c        |  3 +-
 arch/arm64/kvm/hypercalls.c         | 28 +++++++++++-
 arch/arm64/kvm/psci.c               | 69 ++++++++++++++--------------
 10 files changed, 170 insertions(+), 66 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 58+ messages in thread
* Re: [RFC PATCH 4/5] KVM: arm64: Pass hypercalls to userspace
@ 2021-06-08 17:40 kernel test robot
  0 siblings, 0 replies; 58+ messages in thread
From: kernel test robot @ 2021-06-08 17:40 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210608154805.216869-5-jean-philippe@linaro.org>
References: <20210608154805.216869-5-jean-philippe@linaro.org>
TO: "Jean-Philippe Brucker" <jean-philippe@linaro.org>

Hi Jean-Philippe,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on kvmarm/next]
[also build test WARNING on kvm/queue v5.13-rc5 next-20210608]
[cannot apply to vhost/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jean-Philippe-Brucker/KVM-arm64-Pass-PSCI-to-userspace/20210608-235708
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
cd tools/perf && ./check-headers.sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


perfheadercheck warnings: (new ones prefixed by >>)
   Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h': 1086> #define KVM_CAP_ARM_MP_HALTED 199
>> Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h': 1087> #define KVM_CAP_ARM_HVC_TO_USER 200

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

end of thread, other threads:[~2021-07-21 17:58 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 15:48 [RFC PATCH 0/5] KVM: arm64: Pass PSCI to userspace Jean-Philippe Brucker
2021-06-08 15:48 ` Jean-Philippe Brucker
2021-06-08 15:48 ` Jean-Philippe Brucker
2021-06-08 15:48 ` [RFC PATCH 1/5] KVM: arm64: Replace power_off with mp_state in struct kvm_vcpu_arch Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-10 15:08   ` Jonathan Cameron
2021-06-10 15:08     ` Jonathan Cameron
2021-06-10 15:08     ` Jonathan Cameron
2021-07-01  9:44   ` Fuad Tabba
2021-07-01  9:44     ` Fuad Tabba
2021-07-01  9:44     ` Fuad Tabba
2021-06-08 15:48 ` [RFC PATCH 2/5] KVM: arm64: Move WFI execution to check_vcpu_requests() Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-07-01  9:45   ` Fuad Tabba
2021-07-01  9:45     ` Fuad Tabba
2021-07-01  9:45     ` Fuad Tabba
2021-06-08 15:48 ` [RFC PATCH 3/5] KVM: arm64: Allow userspace to request WFI Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-07-01  9:45   ` Fuad Tabba
2021-07-01  9:45     ` Fuad Tabba
2021-07-01  9:45     ` Fuad Tabba
2021-06-08 15:48 ` [RFC PATCH 4/5] KVM: arm64: Pass hypercalls to userspace Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-10 16:02   ` Jonathan Cameron
2021-06-10 16:02     ` Jonathan Cameron
2021-06-10 16:02     ` Jonathan Cameron
2021-07-01  9:46   ` Fuad Tabba
2021-07-01  9:46     ` Fuad Tabba
2021-07-01  9:46     ` Fuad Tabba
2021-07-01  9:54   ` Russell King (Oracle)
2021-07-01  9:54     ` Russell King (Oracle)
2021-07-01  9:54     ` Russell King (Oracle)
2021-06-08 15:48 ` [RFC PATCH 5/5] KVM: arm64: Pass PSCI calls " Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-06-08 15:48   ` Jean-Philippe Brucker
2021-07-01  9:46   ` Fuad Tabba
2021-07-01  9:46     ` Fuad Tabba
2021-07-01  9:46     ` Fuad Tabba
2021-07-19 15:29 ` [RFC PATCH 0/5] KVM: arm64: Pass PSCI " Alexandru Elisei
2021-07-19 15:29   ` Alexandru Elisei
2021-07-19 15:29   ` Alexandru Elisei
2021-07-19 18:02   ` Jean-Philippe Brucker
2021-07-19 18:02     ` Jean-Philippe Brucker
2021-07-19 18:02     ` Jean-Philippe Brucker
2021-07-19 19:37     ` Oliver Upton
2021-07-19 19:37       ` Oliver Upton
2021-07-19 19:37       ` Oliver Upton
2021-07-21 17:46       ` Jean-Philippe Brucker
2021-07-21 17:46         ` Jean-Philippe Brucker
2021-07-21 17:46         ` Jean-Philippe Brucker
2021-07-21 17:56 ` Jean-Philippe Brucker
2021-07-21 17:56   ` Jean-Philippe Brucker
2021-07-21 17:56   ` Jean-Philippe Brucker
2021-06-08 17:40 [RFC PATCH 4/5] KVM: arm64: Pass hypercalls " kernel test robot

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.