public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/vdso: Fix build when CONFIG_KVM_GUEST is not set
Date: Wed, 23 Dec 2015 11:32:36 +0100	[thread overview]
Message-ID: <20151223103236.GC30213@pd.tnic> (raw)
In-Reply-To: <1450810251-19120-1-git-send-email-bp@alien8.de>

On Tue, Dec 22, 2015 at 07:50:51PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> 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 <bp@suse.de>
> ---
>  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 <linux/clocksource.h>
>  #include <asm/pvclock-abi.h>
>  
> -#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.

      reply	other threads:[~2015-12-23 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 18:50 [PATCH] x86/vdso: Fix build when CONFIG_KVM_GUEST is not set Borislav Petkov
2015-12-23 10:32 ` Borislav Petkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151223103236.GC30213@pd.tnic \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox