summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/hypercalls.c
diff options
context:
space:
mode:
authorSteven Price <steven.price@arm.com>2019-10-21 16:28:16 +0100
committerMarc Zyngier <maz@kernel.org>2019-10-21 19:20:27 +0100
commitb48c1a45a190898103cec28771efc399fd65a05a (patch)
treeaeaa6b765b8d6a0c12de852832a0d73a51b1ac1f /virt/kvm/arm/hypercalls.c
parent55009c6ed2d24fc0f5521ab2482f145d269389ea (diff)
downloadlinux-b48c1a45a190898103cec28771efc399fd65a05a.tar.bz2
KVM: arm64: Implement PV_TIME_FEATURES call
This provides a mechanism for querying which paravirtualized time features are available in this hypervisor. Also add the header file which defines the ABI for the paravirtualized time features we're about to add. Signed-off-by: Steven Price <steven.price@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'virt/kvm/arm/hypercalls.c')
-rw-r--r--virt/kvm/arm/hypercalls.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/virt/kvm/arm/hypercalls.c b/virt/kvm/arm/hypercalls.c
index f875241bd030..97ea8b133e77 100644
--- a/virt/kvm/arm/hypercalls.c
+++ b/virt/kvm/arm/hypercalls.c
@@ -12,7 +12,7 @@
int kvm_hvc_call_handler(struct kvm_vcpu *vcpu)
{
u32 func_id = smccc_get_function(vcpu);
- u32 val = SMCCC_RET_NOT_SUPPORTED;
+ long val = SMCCC_RET_NOT_SUPPORTED;
u32 feature;
switch (func_id) {
@@ -48,8 +48,14 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu)
break;
}
break;
+ case ARM_SMCCC_HV_PV_TIME_FEATURES:
+ val = SMCCC_RET_SUCCESS;
+ break;
}
break;
+ case ARM_SMCCC_HV_PV_TIME_FEATURES:
+ val = kvm_hypercall_pv_features(vcpu);
+ break;
default:
return kvm_psci_call(vcpu);
}