linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 00/12] In-kernel PSCI v0.2 emulation for KVM ARM/ARM64
@ 2014-04-02 10:42 Anup Patel
  2014-04-02 10:42 ` [PATCH v7 01/12] KVM: Add capability to advertise PSCI v0.2 support Anup Patel
                   ` (12 more replies)
  0 siblings, 13 replies; 24+ messages in thread
From: Anup Patel @ 2014-04-02 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Currently, KVM ARM/ARM64 only provides in-kernel emulation of Power State
and Coordination Interface (PSCI) v0.1.

This patchset aims at providing newer PSCI v0.2 for KVM ARM/ARM64 VCPUs
such that it does not break current KVM ARM/ARM64 ABI.

The user space tools (i.e. QEMU or KVMTOOL) will have to explicitly enable
KVM_ARM_VCPU_PSCI_0_2 feature using KVM_ARM_VCPU_INIT ioctl for providing
PSCI v0.2 to VCPUs.

Changlog:

V7:
 - Make uapi/linux/psci.h inline with Ashwin's patch
   http://www.spinics.net/lists/arm-kernel/msg319090.html
 - Incorporate Rob's suggestions for uapi/linux/psci.h
 - Treat CPU_SUSPEND power-down request to be same as standby
   request. This further simplifies CPU_SUSPEND emulation.

V6:
 - Introduce uapi/linux/psci.h for sharing PSCI defines between
   ARM kernel, ARM64 kernel, KVM ARM/ARM64 and user space
 - Make CPU_SUSPEND emulation similar to WFI emulation

V5:
 - Have separate last patch to advertise KVM_CAP_ARM_PSCI_0_2
 - Use kvm_psci_version() in kvm_psci_vcpu_on()
 - Return ALREADY_ON for PSCI v0.2 CPU_ON if VCPU is not paused
 - Remove per-VCPU suspend context
 - As-per PSCI v0.2 spec, only current CPU can suspend itself

V4:
 - Implement all mandatory functions required by PSCI v0.2

V3:
 - Make KVM_ARM_VCPU_PSCI_0_2 feature experiementatl for now so that
   it fails for user space till all mandatory PSCI v0.2 functions are
   emulated by KVM ARM/ARM64
 - Have separate patch for making KVM_ARM_VCPU_PSCI_0_2 feature available
   to user space. This patch can be defferred for now

V2:
 - Don't rename PSCI return values KVM_PSCI_RET_NI and KVM_PSCI_RET_INVAL
 - Added kvm_psci_version() to get PSCI version available to VCPU
 - Fixed grammer in Documentation/virtual/kvm/api.txt

V1:
 - Initial RFC PATCH

Anup Patel (12):
  KVM: Add capability to advertise PSCI v0.2 support
  ARM/ARM64: KVM: Add common header for PSCI related defines
  ARM/ARM64: KVM: Add base for PSCI v0.2 emulation
  KVM: Documentation: Add info regarding KVM_ARM_VCPU_PSCI_0_2 feature
  ARM/ARM64: KVM: Make kvm_psci_call() return convention      more
    flexible
  KVM: Add KVM_EXIT_SYSTEM_EVENT to user space API header
  ARM/ARM64: KVM: Emulate PSCI v0.2 SYSTEM_OFF and SYSTEM_RESET
  ARM/ARM64: KVM: Emulate PSCI v0.2 AFFINITY_INFO
  ARM/ARM64: KVM: Emulate PSCI v0.2 MIGRATE_INFO_TYPE and related
    functions
  ARM/ARM64: KVM: Fix CPU_ON emulation for PSCI v0.2
  ARM/ARM64: KVM: Emulate PSCI v0.2 CPU_SUSPEND
  ARM/ARM64: KVM: Advertise KVM_CAP_ARM_PSCI_0_2 to user space

 Documentation/virtual/kvm/api.txt |   17 +++
 arch/arm/include/asm/kvm_host.h   |    2 +-
 arch/arm/include/asm/kvm_psci.h   |    6 +-
 arch/arm/include/uapi/asm/kvm.h   |   19 +--
 arch/arm/kvm/arm.c                |    1 +
 arch/arm/kvm/handle_exit.c        |   10 +-
 arch/arm/kvm/psci.c               |  231 ++++++++++++++++++++++++++++++++++---
 arch/arm64/include/asm/kvm_host.h |    2 +-
 arch/arm64/include/asm/kvm_psci.h |    6 +-
 arch/arm64/include/uapi/asm/kvm.h |   21 ++--
 arch/arm64/kvm/handle_exit.c      |   10 +-
 include/uapi/linux/Kbuild         |    1 +
 include/uapi/linux/kvm.h          |    9 ++
 include/uapi/linux/psci.h         |   73 ++++++++++++
 14 files changed, 360 insertions(+), 48 deletions(-)
 create mode 100644 include/uapi/linux/psci.h

-- 
1.7.9.5

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

end of thread, other threads:[~2014-04-03  5:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 10:42 [PATCH v7 00/12] In-kernel PSCI v0.2 emulation for KVM ARM/ARM64 Anup Patel
2014-04-02 10:42 ` [PATCH v7 01/12] KVM: Add capability to advertise PSCI v0.2 support Anup Patel
2014-04-02 10:42 ` [PATCH v7 02/12] ARM/ARM64: KVM: Add common header for PSCI related defines Anup Patel
2014-04-02 17:29   ` Ashwin Chaugule
2014-04-03  4:54     ` Anup Patel
2014-04-02 10:42 ` [PATCH v7 03/12] ARM/ARM64: KVM: Add base for PSCI v0.2 emulation Anup Patel
2014-04-02 10:42 ` [PATCH v7 04/12] KVM: Documentation: Add info regarding KVM_ARM_VCPU_PSCI_0_2 feature Anup Patel
2014-04-02 10:42 ` [PATCH v7 05/12] ARM/ARM64: KVM: Make kvm_psci_call() return convention more flexible Anup Patel
2014-04-02 10:42 ` [PATCH v7 06/12] KVM: Add KVM_EXIT_SYSTEM_EVENT to user space API header Anup Patel
2014-04-02 10:42 ` [PATCH v7 07/12] ARM/ARM64: KVM: Emulate PSCI v0.2 SYSTEM_OFF and SYSTEM_RESET Anup Patel
2014-04-02 10:42 ` [PATCH v7 08/12] ARM/ARM64: KVM: Emulate PSCI v0.2 AFFINITY_INFO Anup Patel
2014-04-02 13:04   ` Rob Herring
2014-04-03  5:07     ` Anup Patel
2014-04-02 10:42 ` [PATCH v7 09/12] ARM/ARM64: KVM: Emulate PSCI v0.2 MIGRATE_INFO_TYPE and related functions Anup Patel
2014-04-02 13:07   ` Rob Herring
2014-04-03  5:03     ` Anup Patel
2014-04-02 10:42 ` [PATCH v7 10/12] ARM/ARM64: KVM: Fix CPU_ON emulation for PSCI v0.2 Anup Patel
2014-04-02 13:12   ` Rob Herring
2014-04-03  5:06     ` Anup Patel
2014-04-02 10:42 ` [PATCH v7 11/12] ARM/ARM64: KVM: Emulate PSCI v0.2 CPU_SUSPEND Anup Patel
2014-04-02 21:03   ` Christoffer Dall
2014-04-03  5:28     ` Anup Patel
2014-04-02 10:42 ` [PATCH v7 12/12] ARM/ARM64: KVM: Advertise KVM_CAP_ARM_PSCI_0_2 to user space Anup Patel
2014-04-02 13:28 ` [PATCH v7 00/12] In-kernel PSCI v0.2 emulation for KVM ARM/ARM64 Rob Herring

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).