diff options
author | Anup Patel <anup.patel@linaro.org> | 2014-04-29 01:54:16 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-04-30 07:18:57 -0400 |
commit | 7d0f84aae9e231930985eaff63ac91b61aaa15d6 (patch) | |
tree | b034732021a3b095fd39139f3205ddfe299b7c2f /arch/arm/include/asm | |
parent | e546eea74ec66698e29c583639cf6e2a11e46490 (diff) |
ARM/ARM64: KVM: Add base for PSCI v0.2 emulation
Currently, the in-kernel PSCI emulation provides PSCI v0.1 interface to
VCPUs. This patch extends current in-kernel PSCI emulation to provide
PSCI v0.2 interface to VCPUs.
By default, ARM/ARM64 KVM will always provide PSCI v0.1 interface for
keeping the ABI backward-compatible.
To select PSCI v0.2 interface for VCPUs, the user space (i.e. QEMU or
KVMTOOL) will have to set KVM_ARM_VCPU_PSCI_0_2 feature when doing VCPU
init using KVM_ARM_VCPU_INIT ioctl.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/kvm_psci.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 09af14999c9b..193ceaf01bfd 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 36 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
37 | #define KVM_HAVE_ONE_REG | 37 | #define KVM_HAVE_ONE_REG |
38 | 38 | ||
39 | #define KVM_VCPU_MAX_FEATURES 1 | 39 | #define KVM_VCPU_MAX_FEATURES 2 |
40 | 40 | ||
41 | #include <kvm/arm_vgic.h> | 41 | #include <kvm/arm_vgic.h> |
42 | 42 | ||
diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h index 9a83d98bf170..4c0e3e1d1597 100644 --- a/arch/arm/include/asm/kvm_psci.h +++ b/arch/arm/include/asm/kvm_psci.h | |||
@@ -18,6 +18,10 @@ | |||
18 | #ifndef __ARM_KVM_PSCI_H__ | 18 | #ifndef __ARM_KVM_PSCI_H__ |
19 | #define __ARM_KVM_PSCI_H__ | 19 | #define __ARM_KVM_PSCI_H__ |
20 | 20 | ||
21 | #define KVM_ARM_PSCI_0_1 1 | ||
22 | #define KVM_ARM_PSCI_0_2 2 | ||
23 | |||
24 | int kvm_psci_version(struct kvm_vcpu *vcpu); | ||
21 | bool kvm_psci_call(struct kvm_vcpu *vcpu); | 25 | bool kvm_psci_call(struct kvm_vcpu *vcpu); |
22 | 26 | ||
23 | #endif /* __ARM_KVM_PSCI_H__ */ | 27 | #endif /* __ARM_KVM_PSCI_H__ */ |