aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64
diff options
context:
space:
mode:
authorAndrew Jones2020-08-04 19:05:59 +0200
committerMarc Zyngier2020-08-21 14:04:14 +0100
commit38480df564cc68f081bb38998927d164b9010995 (patch)
tree7ec18c91b2cec7ce2daf92a05d5b324721e8188f /arch/arm64
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff)
KVM: arm64: pvtime: steal-time is only supported when configured
Don't confuse the guest by saying steal-time is supported when it hasn't been configured by userspace and won't work. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20200804170604.42662-2-drjones@redhat.com
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/kvm/pvtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kvm/pvtime.c b/arch/arm64/kvm/pvtime.c
index f7b52ce1557e..c3ef4ebd6846 100644
--- a/arch/arm64/kvm/pvtime.c
+++ b/arch/arm64/kvm/pvtime.c
@@ -43,7 +43,8 @@ long kvm_hypercall_pv_features(struct kvm_vcpu *vcpu)
switch (feature) {
case ARM_SMCCC_HV_PV_TIME_FEATURES:
case ARM_SMCCC_HV_PV_TIME_ST:
- val = SMCCC_RET_SUCCESS;
+ if (vcpu->arch.steal.base != GPA_INVALID)
+ val = SMCCC_RET_SUCCESS;
break;
}