From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932166AbdBIPYU (ORCPT ); Thu, 9 Feb 2017 10:24:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60966 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbdBIPYR (ORCPT ); Thu, 9 Feb 2017 10:24:17 -0500 Subject: Re: [PATCH] KVM: x86: hide KVM_HC_CLOCK_PAIRING on 32 bit To: Arnd Bergmann , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <20170209151058.1180943-1-arnd@arndb.de> Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Xiao Guangrong , Borislav Petkov , Tom Lendacky , Marcelo Tosatti , Sebastian Andrzej Siewior , kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Paolo Bonzini Message-ID: <23c2e560-cfe9-a4a7-f464-9647b309fb88@redhat.com> Date: Thu, 9 Feb 2017 16:24:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170209151058.1180943-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 09 Feb 2017 15:24:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2017 16:10, Arnd Bergmann wrote: > 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 > --- > arch/x86/kvm/x86.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 10e20afc3314..2bcdc88c8242 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -6149,6 +6149,7 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu) > } > EXPORT_SYMBOL_GPL(kvm_emulate_halt); > > +#ifdef CONFIG_X86_64 > static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr, > unsigned long clock_type) > { > @@ -6175,6 +6176,7 @@ static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr, > > return ret; > } > +#endif > > /* > * kvm_pv_kick_cpu_op: Kick a vcpu. > @@ -6240,9 +6242,11 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) > kvm_pv_kick_cpu_op(vcpu->kvm, a0, a1); > ret = 0; > break; > +#ifdef CONFIG_X86_64 > case KVM_HC_CLOCK_PAIRING: > ret = kvm_pv_clock_pairing(vcpu, a0, a1); > break; > +#endif > default: > ret = -KVM_ENOSYS; > break; > Applied, thanks. Paolo