Code lifted from patch 'x86/mm/kaiser: re-enable vsyscalls', courtesy of Andrea Arcangeli aarcange@redhat.com.
Signed-off-by: Juerg Haefliger juerg.haefliger@canonical.com --- arch/x86/mm/kaiser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index 8b5939649088..fc50dee484f6 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -322,7 +322,7 @@ silent_disable: */ void __init kaiser_init(void) { - int cpu; + int cpu, idx;
if (!kaiser_enabled) return; @@ -371,6 +371,14 @@ void __init kaiser_init(void) kaiser_add_user_map_early((void *)VSYSCALL_ADDR, PAGE_SIZE, vsyscall_pgprot);
+#ifdef CONFIG_PARAVIRT_CLOCK + for (idx = 0; 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); + } +#endif + pr_info("enabled\n"); }