aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-09 10:10:42 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2017-02-09 10:23:39 -0500
commit8ef81a9a453f9048c1683e40b540a4221986a2d1 (patch)
tree2537c10ac7632cd3c18a32729bfb981541ba6269
parent2e751dfb5ffd20d1a31837dbc9718741df69bffe (diff)
KVM: x86: hide KVM_HC_CLOCK_PAIRING on 32 bit
The newly added hypercall doesn't work on x86-32: arch/x86/kvm/x86.c: In function 'kvm_pv_clock_pairing': arch/x86/kvm/x86.c:6163:6: error: implicit declaration of function 'kvm_get_walltime_and_clockread';did you mean 'kvm_get_time_scale'? [-Werror=implicit-function-declaration] This adds an #ifdef around it, matching the one around the related functions that are also only implemented on 64-bit systems. Fixes: 55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 500008f800dc..2f64e5d0ae53 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6148,6 +6148,7 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu)
6148} 6148}
6149EXPORT_SYMBOL_GPL(kvm_emulate_halt); 6149EXPORT_SYMBOL_GPL(kvm_emulate_halt);
6150 6150
6151#ifdef CONFIG_X86_64
6151static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr, 6152static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr,
6152 unsigned long clock_type) 6153 unsigned long clock_type)
6153{ 6154{
@@ -6174,6 +6175,7 @@ static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr,
6174 6175
6175 return ret; 6176 return ret;
6176} 6177}
6178#endif
6177 6179
6178/* 6180/*
6179 * kvm_pv_kick_cpu_op: Kick a vcpu. 6181 * kvm_pv_kick_cpu_op: Kick a vcpu.
@@ -6239,9 +6241,11 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
6239 kvm_pv_kick_cpu_op(vcpu->kvm, a0, a1); 6241 kvm_pv_kick_cpu_op(vcpu->kvm, a0, a1);
6240 ret = 0; 6242 ret = 0;
6241 break; 6243 break;
6244#ifdef CONFIG_X86_64
6242 case KVM_HC_CLOCK_PAIRING: 6245 case KVM_HC_CLOCK_PAIRING:
6243 ret = kvm_pv_clock_pairing(vcpu, a0, a1); 6246 ret = kvm_pv_clock_pairing(vcpu, a0, a1);
6244 break; 6247 break;
6248#endif
6245 default: 6249 default:
6246 ret = -KVM_ENOSYS; 6250 ret = -KVM_ENOSYS;
6247 break; 6251 break;