x86/vdso: Fix build when CONFIG_KVM_GUEST is not set
Borislav Petkov
maintainerPATCH 1/1 x86/vdso: Fix build when CONFIG_KVM_GUEST is not set
From: Borislav Petkov <[email protected]>
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.
--- arch/x86/include/asm/pvclock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/pvclock.h +1 -1
@@ -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 )
Signature · 1 line
2.3.5
Borislav Petkov
maintainerQuoted 26 lines · Borislav Petkov
From: Borislav Petkov <[email protected]>
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 1This is because
pvclock_pvti_cpu0_va()is defined inarch/x86/kernel/kvmclock.cas an accessor to the privatehv_clockthing but ifCONFIG_KVM_GUESTis not set, we don't have that function to link to.So add
CONFIG_KVM_GUESTto the ifdeffery.Signed-off-by Borislav Petkov <[email protected]>--- arch/x86/include/asm/pvclock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/include/asm/pvclock.h +0
-0
arch/x86/include/asm/pvclock.h line 10
Quoted 8 lines
arch/x86/include/asm/pvclock.h +1
-1@@ -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")
Signature · 4 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.