From patchwork Thu Feb 9 15:10:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9564819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CF366020C for ; Thu, 9 Feb 2017 15:13:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28CD728518 for ; Thu, 9 Feb 2017 15:13:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C59E28536; Thu, 9 Feb 2017 15:13:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8684728518 for ; Thu, 9 Feb 2017 15:13:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322AbdBIPNU (ORCPT ); Thu, 9 Feb 2017 10:13:20 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:65512 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbdBIPMt (ORCPT ); Thu, 9 Feb 2017 10:12:49 -0500 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MLiSZ-1ccfSE1p59-000v6r; Thu, 09 Feb 2017 16:11:05 +0100 From: Arnd Bergmann To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Arnd Bergmann , 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 Subject: [PATCH] KVM: x86: hide KVM_HC_CLOCK_PAIRING on 32 bit Date: Thu, 9 Feb 2017 16:10:42 +0100 Message-Id: <20170209151058.1180943-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:qiP8/mZuab+Bp9emVXbsR+lFS0/eSJf9PHZsY3umwAmXPgXSnuW TeprJjxpSy1qSKaKI4Y4pLtHGm2+jGgql24cPqxd2+fCH6RCCmKqJqo2p9YeUf+D/B6DNGe zVO5mq4P+DJvYU1SRnWU/Je2iEfYnErUfdQ5WVRTHYmNwZ/3/UEteulQHiichS5YeS7Wagm FuOardcEEXOsulPw8xX0g== X-UI-Out-Filterresults: notjunk:1; V01:K0:eyxFUBO8So8=:nM6svFDpYjwp5eNjOp3zTU ofKcBtNe2fFkqqJ7lKDi65VlXANFc+mPxJJn04lelIkcj8fMNenIEqwlxVAFBDHO9kyC9cBiU Y6ilrjv4oD8PKu449Ci8i4RZNG9BVXFFhSKohr7fCqC4RLswC502Tcdq5Wx3MI/bbjeNf9Ph0 myaOTjcEIlhhuur5odgTke0hPxVwpkFXndtbd5OSZpbNjgDl4/r0DL6mGN87QPn5ky/3o0jZH /Opa5BfNFlqyFj0pCyupBVSAMHsF3nt10uRIbW7N+eWyQmE48Rm6AIrnxxPw9R8Hvtr4pYZbw 6YVt92HHuOhSPeimsdO8SSJpZBHEdrVNnNHsXJa4me3uz5ZL+fw1OFTrTnZaiT1G44USSRXBi Y3cFOYQ9pxHOe+O5fX41GTT7sf+W+R6xGOpdP7DRfrDW2v+QP8aroMKzIX/JNpZnZrxzMH7b7 CUrUl3UjP/lpNed1CD1LRWtM91UNrVbIO6ygI1J8hpc74pu1kMz6xpl4C3uXDtspT9geUSMso cX9fTz24rQDIiQuesMA2qk6MLUJxXWLd4VhtlItXG3Pf8REY0SxX6u9hUAFFCHQKmMhKROIyZ H6kvXh3/u+QkjDK5O43RgoGwM6WSF6eeOE1CTzkjVBx9ztZF+IthKXfKcmbPrGPqJtgRmxkcD pUoGQ4EChHsHBhzQtGs1xYgBDkqZ5Eh34APdLPY1iu4oJx2hi98p+8389gAHzSIMcFHg= Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;