summaryrefslogtreecommitdiff
blob: 1790f73ed99cd72d33487244128995432ae0ad92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- ./vmci-only/linux/vmciKernelIf.c	2017-02-23 12:19:59.706822502 +0100
+++ ./vmci-only/linux/vmciKernelIf.c.new	2017-02-23 13:12:09.382997502 +0100
@@ -2056,7 +2056,11 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages((VA)produceUVA,
                            produceQ->kernelIf->numPages,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+                           FOLL_WRITE,
+#else
                            1, 0,
+#endif
                            produceQ->kernelIf->u.h.headerPage,
                            NULL);
 #else
@@ -2083,7 +2087,11 @@
                            (VA)consumeUVA,
 #endif
                            consumeQ->kernelIf->numPages,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+                           FOLL_WRITE,
+#else
                            1, 0,
+#endif
                            consumeQ->kernelIf->u.h.headerPage,
                            NULL);
    if (retval < consumeQ->kernelIf->numPages) {
--- ./vmci-only/linux/driver.c	2017-02-23 12:19:59.645822499 +0100
+++ ./vmci-only/linux/driver.c.new	2017-02-23 12:30:38.845858240 +0100
@@ -1468,7 +1468,9 @@
    int retval;
 
    down_read(&current->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+   retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
 #else
    retval = get_user_pages(current, current->mm, addr,
--- ./vmnet-only/userif.c	2017-02-23 12:29:00.909852764 +0100
+++ ./vmnet-only/userif.c.new	2017-02-23 12:28:51.309852227 +0100
@@ -113,7 +113,9 @@
    int retval;
 
    down_read(&current->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+   retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
 #else
    retval = get_user_pages(current, current->mm, addr,
--- ./vmmon-only/linux/hostif.c	2017-02-23 12:19:59.772822506 +0100
+++ ./vmmon-only/linux/hostif.c.new	2017-02-23 12:26:42.661845034 +0100
@@ -1167,7 +1167,9 @@
    int retval;
 
    down_read(&current->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
 #else
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,