summaryrefslogtreecommitdiffstats
path: root/arch/x86/entry/vdso/vma.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-01 23:08:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-01 23:08:46 -0700
commitaa2a4b6569d5b10491b606a86e574dff3852597a (patch)
tree89685efd281ab9ff0db4d5c9d2919120f50b06dc /arch/x86/entry/vdso/vma.c
parentd19458a4ead14da70c4c852659ccb0234ecd769e (diff)
parent90b20432aeb850ef84086a72893cd9411479d896 (diff)
downloadlinux-stable-aa2a4b6569d5b10491b606a86e574dff3852597a.tar.gz
linux-stable-aa2a4b6569d5b10491b606a86e574dff3852597a.tar.bz2
linux-stable-aa2a4b6569d5b10491b606a86e574dff3852597a.zip
Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 vdso updates from Ingo Molnar: "Add support for vDSO acceleration of the "Hyper-V TSC page", to speed up clock reading on Hyper-V guests" * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method x86/hyperv: Move TSC reading method to asm/mshyperv.h x86/hyperv: Implement hv_get_tsc_page()
Diffstat (limited to 'arch/x86/entry/vdso/vma.c')
-rw-r--r--arch/x86/entry/vdso/vma.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 226ca70dc6bd..faf80fdeeacc 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -22,6 +22,7 @@
#include <asm/page.h>
#include <asm/desc.h>
#include <asm/cpufeature.h>
+#include <asm/mshyperv.h>
#if defined(CONFIG_X86_64)
unsigned int __read_mostly vdso64_enabled = 1;
@@ -121,6 +122,12 @@ static int vvar_fault(const struct vm_special_mapping *sm,
vmf->address,
__pa(pvti) >> PAGE_SHIFT);
}
+ } else if (sym_offset == image->sym_hvclock_page) {
+ struct ms_hyperv_tsc_page *tsc_pg = hv_get_tsc_page();
+
+ if (tsc_pg && vclock_was_used(VCLOCK_HVCLOCK))
+ ret = vm_insert_pfn(vma, vmf->address,
+ vmalloc_to_pfn(tsc_pg));
}
if (ret == 0 || ret == -EBUSY)