Skip to content

Commit 8ef81a9

Browse files
arndbbonzini
authored andcommitted
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: 55dd00a ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 2e751df commit 8ef81a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kvm/x86.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6148,6 +6148,7 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu)
61486148
}
61496149
EXPORT_SYMBOL_GPL(kvm_emulate_halt);
61506150

6151+
#ifdef CONFIG_X86_64
61516152
static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr,
61526153
unsigned long clock_type)
61536154
{
@@ -6174,6 +6175,7 @@ static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr,
61746175

61756176
return ret;
61766177
}
6178+
#endif
61776179

61786180
/*
61796181
* kvm_pv_kick_cpu_op: Kick a vcpu.
@@ -6239,9 +6241,11 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
62396241
kvm_pv_kick_cpu_op(vcpu->kvm, a0, a1);
62406242
ret = 0;
62416243
break;
6244+
#ifdef CONFIG_X86_64
62426245
case KVM_HC_CLOCK_PAIRING:
62436246
ret = kvm_pv_clock_pairing(vcpu, a0, a1);
62446247
break;
6248+
#endif
62456249
default:
62466250
ret = -KVM_ENOSYS;
62476251
break;

0 commit comments

Comments
 (0)