From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934201AbbLWKcl (ORCPT ); Wed, 23 Dec 2015 05:32:41 -0500 Received: from mail.skyhub.de ([78.46.96.112]:40697 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934123AbbLWKck (ORCPT ); Wed, 23 Dec 2015 05:32:40 -0500 Date: Wed, 23 Dec 2015 11:32:36 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: X86 ML , LKML Subject: Re: [PATCH] x86/vdso: Fix build when CONFIG_KVM_GUEST is not set Message-ID: <20151223103236.GC30213@pd.tnic> References: <1450810251-19120-1-git-send-email-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1450810251-19120-1-git-send-email-bp@alien8.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2015 at 07:50:51PM +0100, Borislav Petkov wrote: > From: Borislav Petkov > > Doing randbuilds fails like this here at link time: > > arch/x86/built-in.o: In function `arch_setup_additional_pages': > /home/boris/kernel/linux/arch/x86/entry/vdso/vma.c:174: undefined reference to `pvclock_pvti_cpu0_va' > make: *** [vmlinux] Error 1 > > This is because pvclock_pvti_cpu0_va() is defined in > arch/x86/kernel/kvmclock.c as an accessor to the private hv_clock thing > but if CONFIG_KVM_GUEST is not set, we don't have that function to link > to. > > So add CONFIG_KVM_GUEST to the ifdeffery. > > Signed-off-by: Borislav Petkov > --- > arch/x86/include/asm/pvclock.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h > index 66df22b2e0c9..1af6bee77fb0 100644 > --- a/arch/x86/include/asm/pvclock.h > +++ b/arch/x86/include/asm/pvclock.h > @@ -4,7 +4,7 @@ > #include > #include > > -#ifdef CONFIG_PARAVIRT_CLOCK > +#if defined(CONFIG_PARAVIRT_CLOCK) && defined(CONFIG_KVM_GUEST) > extern struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void); > #else > static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void) > -- Ok, ignore this one for now - we need to sort out the tip:x86/vdso mess first and in particular: 677a73a9aa54 ("x86/kvm: On KVM re-enable (e.g. after suspend), update clocks") -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.