From: Andrea Arcangeli <aarcange@xxxxxxxxxx> Adding shadow pgd mappings for unmapped kernel-side areas triggers harmless boot warnings. To reduce the boot warnings (if booted on bare metal) make the fixmap mapping of pvclock region conditional to pvclock being actived at boot. KAISER is initialized after pvlock. Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> Signed-off-by: Juerg Haefliger <juerg.haefliger@xxxxxxxxxxxxx> --- arch/x86/mm/kaiser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index 3f0b0b41badc..14c332caab60 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -24,6 +24,7 @@ extern struct mm_struct init_mm; #include <asm/desc.h> #include <asm/vsyscall.h> #include <asm/cmdline.h> +#include <asm/kvmclock.h> int kaiser_enabled __read_mostly = 1; EXPORT_SYMBOL(kaiser_enabled); /* for inlined TLB flush functions */ @@ -372,7 +373,8 @@ void __init kaiser_init(void) vsyscall_pgprot); #ifdef CONFIG_PARAVIRT_CLOCK - for (idx = 0; idx <= (PVCLOCK_FIXMAP_END-PVCLOCK_FIXMAP_BEGIN); idx++) { + for (idx = 0; kvm_clock.archdata.vclock_mode == VCLOCK_PVCLOCK && + idx <= (PVCLOCK_FIXMAP_END-PVCLOCK_FIXMAP_BEGIN); idx++) { kaiser_add_user_map_early((void *)__fix_to_virt(PVCLOCK_FIXMAP_BEGIN + idx), PAGE_SIZE, __PAGE_KERNEL_VVAR | _PAGE_GLOBAL); -- 2.14.1