summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Kitsinger (SwooshyCueb)2017-03-20 19:24:31 -0500
committerMarkus Kitsinger (SwooshyCueb)2017-03-20 19:24:31 -0500
commit43a8c3cb76d0bb2c6bd380cdab1a87bfd0f99c57 (patch)
tree34999ff7f52b4d619f133153eaaf864867d872f4
parent570b32ae936b14e6cef4e6463fb0972c4aca3cef (diff)
downloadaur-43a8c3cb76d0bb2c6bd380cdab1a87bfd0f99c57.tar.gz
Update for new version of vmware
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD6
-rw-r--r--vmmon.patch98
-rw-r--r--vmnet.patch80
4 files changed, 98 insertions, 94 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a6c6c593cd73..b2e3ae98a083 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Jan 30 03:16:15 UTC 2017
+# Tue Mar 21 00:24:04 UTC 2017
pkgbase = vmware-modules-dkms
pkgdesc = VMware Workstation kernel modules (DKMS)
pkgver = 308.0
- pkgrel = 13
+ pkgrel = 14
url = http://www.vmware.com/
install = vmware-modules-dkms.install
arch = i686
@@ -28,8 +28,8 @@ pkgbase = vmware-modules-dkms
sha256sums = 489ab58c7bc605588271f41e563c4e97ea65798fbc4ab7ec5b2135c79df5de1a
sha256sums = b81a2c26a6af145a934118a0d19d22ff7a73464dfa849d24ba0dd785f119ae7e
sha256sums = f24586ccb45106322bcff9dff92ef2caf9f32c73f2ec1c67f178c7ee2559ac0e
- sha256sums = 270493aac68667a78e3aab54316a4548d15e610c19c5791f7b6cc2e7483be6da
- sha256sums = 43619d79462df490c275b41865089450e8c7682dc4d0df465a1c2fe380aa05af
+ sha256sums = 614c337174257e3b62a8dcf536f8a3b29695b610cb2d22609d39ccc8d671e8ec
+ sha256sums = 27c375bffdfc141461da77acf80109b3477616bf39b89e4c5cf8e05e1579f6dc
sha256sums = 50bf86f3306fbdafa0a5d5947fb64c06e2a236be84e2ba3f7057f84cc49f7828
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index b7bed5a2f0b2..ae70110a67a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@
pkgname=vmware-modules-dkms
_pkgbase=vmware-modules
pkgver=308.0
-pkgrel=13
+pkgrel=14
pkgdesc="VMware Workstation kernel modules (DKMS)"
arch=('i686' 'x86_64')
url="http://www.vmware.com/"
@@ -39,8 +39,8 @@ sha256sums=('493ff26082307ff58f19b391c5a72625d7071ad12fed9232f0f2e2d4339c3a45'
'489ab58c7bc605588271f41e563c4e97ea65798fbc4ab7ec5b2135c79df5de1a'
'b81a2c26a6af145a934118a0d19d22ff7a73464dfa849d24ba0dd785f119ae7e'
'f24586ccb45106322bcff9dff92ef2caf9f32c73f2ec1c67f178c7ee2559ac0e'
- '270493aac68667a78e3aab54316a4548d15e610c19c5791f7b6cc2e7483be6da'
- '43619d79462df490c275b41865089450e8c7682dc4d0df465a1c2fe380aa05af'
+ '614c337174257e3b62a8dcf536f8a3b29695b610cb2d22609d39ccc8d671e8ec'
+ '27c375bffdfc141461da77acf80109b3477616bf39b89e4c5cf8e05e1579f6dc'
'50bf86f3306fbdafa0a5d5947fb64c06e2a236be84e2ba3f7057f84cc49f7828'
'SKIP')
diff --git a/vmmon.patch b/vmmon.patch
index f2c4fd370679..283cb75e6ef6 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -137,7 +137,7 @@ index 87cf45b..5390a93 100644
retval = -EINVAL;
}
diff --git a/vmmon/linux/hostif.c b/vmmon/linux/hostif.c
-index 7053a83..583d6da 100644
+index fd32013..583d6da 100644
--- a/vmmon/linux/hostif.c
+++ b/vmmon/linux/hostif.c
@@ -74,6 +74,7 @@
@@ -242,11 +242,13 @@ index 7053a83..583d6da 100644
*
* Side effects:
* None
-@@ -1162,12 +1167,16 @@ HostIFGetUserPages(void *uvAddr, // IN
+@@ -1162,14 +1167,16 @@ HostIFGetUserPages(void *uvAddr, // IN
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);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
+ retval = get_user_pages((unsigned long)uvAddr,
@@ -262,7 +264,7 @@ index 7053a83..583d6da 100644
up_read(&current->mm->mmap_sem);
return retval != numPages;
-@@ -1179,11 +1188,11 @@ HostIFGetUserPages(void *uvAddr, // IN
+@@ -1181,11 +1188,11 @@ HostIFGetUserPages(void *uvAddr, // IN
*
* HostIF_IsLockedByMPN --
*
@@ -276,7 +278,7 @@ index 7053a83..583d6da 100644
*
* Side effects:
* None.
-@@ -1305,7 +1314,7 @@ HostIF_UnlockPage(VMDriver *vm, // IN:
+@@ -1307,7 +1314,7 @@ HostIF_UnlockPage(VMDriver *vm, // IN:
vpn = VA_2_VPN((VA)addr);
e = MemTrack_LookupVPN(vm->memtracker, vpn);
@@ -285,7 +287,7 @@ index 7053a83..583d6da 100644
if (e == NULL) {
return PAGE_UNLOCK_NOT_TRACKED;
}
-@@ -1351,7 +1360,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
+@@ -1353,7 +1360,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
{
void *va = VA64ToPtr(uAddr);
MemTrackEntry *e;
@@ -294,7 +296,7 @@ index 7053a83..583d6da 100644
/*
* Verify for debugging that VA and MPN make sense.
* PgtblVa2MPN() can fail under high memory pressure.
-@@ -1369,7 +1378,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
+@@ -1371,7 +1378,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
}
/*
@@ -303,7 +305,7 @@ index 7053a83..583d6da 100644
* HostIF_LockPage(allowMultipleMPNsPerVA = TRUE).
* That means that this MPN should not be in the MemTracker.
*/
-@@ -1382,7 +1391,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
+@@ -1384,7 +1391,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
return PAGE_UNLOCK_MISMATCHED_TYPE;
}
}
@@ -312,7 +314,7 @@ index 7053a83..583d6da 100644
HOST_UNLOCK_PFN_BYMPN(vm, mpn);
-@@ -1390,7 +1399,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
+@@ -1392,7 +1399,7 @@ HostIF_UnlockPageByMPN(VMDriver *vm, // IN: VMDriver
}
@@ -321,7 +323,7 @@ index 7053a83..583d6da 100644
UnlockEntry(void *clientData, // IN:
MemTrackEntry *entryPtr) // IN:
{
-@@ -1453,11 +1462,11 @@ HostIF_FreeAllResources(VMDriver *vm) // IN
+@@ -1455,11 +1462,11 @@ HostIF_FreeAllResources(VMDriver *vm) // IN
*
* HostIF_AllocKernelMem
*
@@ -336,7 +338,7 @@ index 7053a83..583d6da 100644
*
* Side effects:
* memory is malloced
-@@ -1469,8 +1478,8 @@ HostIF_AllocKernelMem(size_t size, // IN:
+@@ -1471,8 +1478,8 @@ HostIF_AllocKernelMem(size_t size, // IN:
int wired) // IN:
{
void * ptr = kmalloc(size, GFP_KERNEL);
@@ -347,7 +349,7 @@ index 7053a83..583d6da 100644
Warning("%s failed (size=%p)\n", __func__, (void*)size);
}
-@@ -1498,7 +1507,7 @@ void *
+@@ -1500,7 +1507,7 @@ void *
HostIF_AllocPage(void)
{
VA kvAddr;
@@ -356,7 +358,7 @@ index 7053a83..583d6da 100644
kvAddr = __get_free_page(GFP_KERNEL);
if (kvAddr == 0) {
Warning("%s: __get_free_page() failed\n", __func__);
-@@ -1513,7 +1522,7 @@ HostIF_AllocPage(void)
+@@ -1515,7 +1522,7 @@ HostIF_AllocPage(void)
*
* HostIF_FreeKernelMem
*
@@ -365,7 +367,7 @@ index 7053a83..583d6da 100644
*
* Results:
* None.
-@@ -1552,7 +1561,7 @@ HostIF_FreePage(void *ptr) // IN:
+@@ -1554,7 +1561,7 @@ HostIF_FreePage(void *ptr) // IN:
* from the kernel without causing the host to die or to be really upset.
*
* Results:
@@ -374,7 +376,7 @@ index 7053a83..583d6da 100644
*
* Side effects:
* none
-@@ -1580,9 +1589,9 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN
+@@ -1582,9 +1589,9 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN
* Use the memory information linux exports as of late for a more
* precise estimate of locked memory. All kernel page-related structures
* (slab, pagetable) are as good as locked. Unevictable includes things
@@ -387,7 +389,7 @@ index 7053a83..583d6da 100644
*/
unsigned int forHost;
-@@ -1602,7 +1611,7 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN
+@@ -1604,7 +1611,7 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN
unsigned int swapPages = BYTES_2_PAGES(linuxState.swapSize);
if (anonPages > swapPages) {
@@ -396,7 +398,7 @@ index 7053a83..583d6da 100644
}
forHost = lockedPages + LOCKED_PAGE_SLACK;
if (forHost > totalPhysicalPages) {
-@@ -1647,7 +1656,7 @@ HostIF_Wait(unsigned int timeoutMs)
+@@ -1649,7 +1656,7 @@ HostIF_Wait(unsigned int timeoutMs)
*----------------------------------------------------------------------
*/
@@ -405,7 +407,7 @@ index 7053a83..583d6da 100644
HostIF_WaitForFreePages(unsigned int timeoutMs) // IN:
{
static unsigned count;
-@@ -1672,20 +1681,20 @@ HostIF_WaitForFreePages(unsigned int timeoutMs) // IN:
+@@ -1674,20 +1681,20 @@ HostIF_WaitForFreePages(unsigned int timeoutMs) // IN:
* timeofday to have small drift (due to NTP rate correction, etc).
* We handle this by rebasing the jiffies based monotonic clock
* every second (see HostIFUptimeResyncMono).
@@ -429,7 +431,7 @@ index 7053a83..583d6da 100644
{
struct timeval tv;
uint64 monotime, uptime, upBase, monoBase;
-@@ -1707,14 +1716,14 @@ HostIFReadUptimeWork(unsigned long *j) // OUT: current jiffies
+@@ -1709,14 +1716,14 @@ HostIFReadUptimeWork(unsigned long *j) // OUT: current jiffies
do_gettimeofday(&tv);
upBase = Atomic_Read64(&uptimeState.uptimeBase);
@@ -447,7 +449,7 @@ index 7053a83..583d6da 100644
* Use the jiffies based monotonic time to sanity check gettimeofday.
* If they differ by more than one second, assume the time of day has
* been warped, and use the jiffies time to undo (most of) the warp.
-@@ -1726,7 +1735,7 @@ HostIFReadUptimeWork(unsigned long *j) // OUT: current jiffies
+@@ -1728,7 +1735,7 @@ HostIFReadUptimeWork(unsigned long *j) // OUT: current jiffies
uint64 newUpBase = monotime - (uptime - upBase);
attempts++;
@@ -456,7 +458,7 @@ index 7053a83..583d6da 100644
attempts < 5) {
/* Another thread updated uptimeBase. Recalculate uptime. */
goto retry;
-@@ -1767,7 +1776,7 @@ HostIFUptimeResyncMono(unsigned long data) // IN: ignored
+@@ -1769,7 +1776,7 @@ HostIFUptimeResyncMono(unsigned long data) // IN: ignored
unsigned long jifs;
uintptr_t flags;
@@ -465,7 +467,7 @@ index 7053a83..583d6da 100644
* Read the uptime and the corresponding jiffies value. This will
* also correct the uptime (which is based on time of day) if needed
* before we rebase monotonic time (which is based on jiffies).
-@@ -1775,7 +1784,7 @@ HostIFUptimeResyncMono(unsigned long data) // IN: ignored
+@@ -1777,7 +1784,7 @@ HostIFUptimeResyncMono(unsigned long data) // IN: ignored
uint64 uptime = HostIFReadUptimeWork(&jifs);
@@ -474,7 +476,7 @@ index 7053a83..583d6da 100644
* Every second, recalculate monoBase and jiffiesBase to squash small
* drift between gettimeofday and jiffies. Also, this prevents
* (jiffies - jiffiesBase) wrap on 32-bits.
-@@ -1820,8 +1829,8 @@ HostIF_InitUptime(void)
+@@ -1822,8 +1829,8 @@ HostIF_InitUptime(void)
uptimeState.jiffiesBase = jiffies;
do_gettimeofday(&tv);
@@ -485,7 +487,7 @@ index 7053a83..583d6da 100644
tv.tv_sec * UPTIME_FREQ));
init_timer(&uptimeState.timer);
-@@ -1949,7 +1958,7 @@ HostIF_CopyFromUser(void *dst, // OUT
+@@ -1951,7 +1958,7 @@ HostIF_CopyFromUser(void *dst, // OUT
*-----------------------------------------------------------------------------
*/
@@ -494,7 +496,7 @@ index 7053a83..583d6da 100644
HostIF_CopyToUser(void *dst, // OUT
const void *src, // IN
unsigned int len) // IN
-@@ -1962,15 +1971,15 @@ HostIF_CopyToUser(void *dst, // OUT
+@@ -1964,15 +1971,15 @@ HostIF_CopyToUser(void *dst, // OUT
*-----------------------------------------------------------------------------
*
* HostIF_MapCrossPage --
@@ -516,7 +518,7 @@ index 7053a83..583d6da 100644
* uses a permanent mapping, instead of a temporary one with a high LA.
*
* Results:
-@@ -2158,7 +2167,7 @@ HostIF_VMLock(VMDriver *vm, // IN
+@@ -2160,7 +2167,7 @@ HostIF_VMLock(VMDriver *vm, // IN
* None
*
* Side effects:
@@ -525,7 +527,7 @@ index 7053a83..583d6da 100644
*
*-----------------------------------------------------------------------------
*/
-@@ -2181,7 +2190,7 @@ HostIF_VMUnlock(VMDriver *vm, // IN
+@@ -2183,7 +2190,7 @@ HostIF_VMUnlock(VMDriver *vm, // IN
* HostIF_VMLockIsHeld --
*
* Determine if the per-VM lock is held by the current thread.
@@ -534,7 +536,7 @@ index 7053a83..583d6da 100644
* Results:
* TRUE if yes
* FALSE if no
-@@ -2237,14 +2246,14 @@ HostIF_VMLockIsHeld(VMDriver *vm) // IN
+@@ -2239,14 +2246,14 @@ HostIF_VMLockIsHeld(VMDriver *vm) // IN
*
*----------------------------------------------------------------------
*/
@@ -551,7 +553,7 @@ index 7053a83..583d6da 100644
old_fs = get_fs();
set_fs(get_ds());
r = APICR_TO_ADDR(r, APICR_VERSION);
-@@ -2319,7 +2328,7 @@ ProbeAPIC(VMDriver *vm, // IN/OUT: driver state
+@@ -2321,7 +2328,7 @@ ProbeAPIC(VMDriver *vm, // IN/OUT: driver state
Bool setVMPtr) // IN: set a pointer to the APIC's virtual address
{
MA ma = APIC_GetMA();
@@ -560,7 +562,7 @@ index 7053a83..583d6da 100644
if (ma == (MA)-1) {
return FALSE;
}
-@@ -2420,7 +2429,7 @@ HostIF_APICInit(VMDriver *vm, // IN:
+@@ -2422,7 +2429,7 @@ HostIF_APICInit(VMDriver *vm, // IN:
* Perform the semaphore wait (P) operation, possibly blocking.
*
* Result:
@@ -569,7 +571,7 @@ index 7053a83..583d6da 100644
* negated error code otherwise.
*
* Side-effects:
-@@ -2429,7 +2438,7 @@ HostIF_APICInit(VMDriver *vm, // IN:
+@@ -2431,7 +2438,7 @@ HostIF_APICInit(VMDriver *vm, // IN:
*-----------------------------------------------------------------------------
*/
@@ -578,7 +580,7 @@ index 7053a83..583d6da 100644
HostIF_SemaphoreWait(VMDriver *vm, // IN:
Vcpuid vcpuid, // IN:
uint64 *args) // IN:
-@@ -2452,7 +2461,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
+@@ -2454,7 +2461,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
{
struct poll_wqueues table;
unsigned int mask;
@@ -587,7 +589,7 @@ index 7053a83..583d6da 100644
poll_initwait(&table);
current->state = TASK_INTERRUPTIBLE;
mask = file->f_op->poll(file, &table.pt);
-@@ -2527,7 +2536,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
+@@ -2529,7 +2536,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
*-----------------------------------------------------------------------------
*/
@@ -596,7 +598,7 @@ index 7053a83..583d6da 100644
HostIF_SemaphoreForceWakeup(VMDriver *vm, // IN:
const VCPUSet *vcs) // IN:
{
-@@ -2817,8 +2826,8 @@ HostIF_CallOnEachCPU(void (*func)(void*), // IN: function to call
+@@ -2819,8 +2826,8 @@ HostIF_CallOnEachCPU(void (*func)(void*), // IN: function to call
*
* HostIF_ReadPage --
*
@@ -607,7 +609,7 @@ index 7053a83..583d6da 100644
*
* Results:
* 0 on success
-@@ -2849,7 +2858,7 @@ HostIF_ReadPage(MPN mpn, // MPN of the page
+@@ -2851,7 +2858,7 @@ HostIF_ReadPage(MPN mpn, // MPN of the page
if (ptr == NULL) {
return -ENOMEM;
}
@@ -616,7 +618,7 @@ index 7053a83..583d6da 100644
if (kernelBuffer) {
memcpy(buf, ptr, PAGE_SIZE);
} else {
-@@ -2866,7 +2875,7 @@ HostIF_ReadPage(MPN mpn, // MPN of the page
+@@ -2868,7 +2875,7 @@ HostIF_ReadPage(MPN mpn, // MPN of the page
*
* HostIF_WritePage --
*
@@ -625,7 +627,7 @@ index 7053a83..583d6da 100644
* page.
*
* Results:
-@@ -2996,7 +3005,7 @@ HostIF_GetNextAnonPage(VMDriver *vm, MPN inMPN)
+@@ -2998,7 +3005,7 @@ HostIF_GetNextAnonPage(VMDriver *vm, MPN inMPN)
* Side effects:
* None.
*
@@ -634,7 +636,7 @@ index 7053a83..583d6da 100644
*/
uint32
-@@ -3014,18 +3023,18 @@ HostIF_GetCurrentPCPU(void)
+@@ -3016,18 +3023,18 @@ HostIF_GetCurrentPCPU(void)
*
* Wake up the fast clock thread. Can't do this from the timer
* callback, because it holds locks that the scheduling code
@@ -656,7 +658,7 @@ index 7053a83..583d6da 100644
HostIFWakeupClockThread(unsigned long data) //IN:
{
wake_up_process(linuxState.fastClockThread);
-@@ -3036,7 +3045,7 @@ HostIFWakeupClockThread(unsigned long data) //IN:
+@@ -3038,7 +3045,7 @@ HostIFWakeupClockThread(unsigned long data) //IN:
*----------------------------------------------------------------------
*
* HostIFTimerCallback --
@@ -665,7 +667,7 @@ index 7053a83..583d6da 100644
* Schedule a tasklet to wake up the fast clock thread.
*
* Results:
-@@ -3047,8 +3056,8 @@ HostIFWakeupClockThread(unsigned long data) //IN:
+@@ -3049,8 +3056,8 @@ HostIFWakeupClockThread(unsigned long data) //IN:
*
*----------------------------------------------------------------------
*/
@@ -676,7 +678,7 @@ index 7053a83..583d6da 100644
HostIFTimerCallback(struct hrtimer *timer) //IN:
{
tasklet_schedule(&timerTasklet);
-@@ -3061,7 +3070,7 @@ HostIFTimerCallback(struct hrtimer *timer) //IN:
+@@ -3063,7 +3070,7 @@ HostIFTimerCallback(struct hrtimer *timer) //IN:
*----------------------------------------------------------------------
*
* HostIFScheduleHRTimeout --
@@ -685,7 +687,7 @@ index 7053a83..583d6da 100644
* Schedule an hrtimer to wake up the fast clock thread.
*
* Results:
-@@ -3073,7 +3082,7 @@ HostIFTimerCallback(struct hrtimer *timer) //IN:
+@@ -3075,7 +3082,7 @@ HostIFTimerCallback(struct hrtimer *timer) //IN:
*----------------------------------------------------------------------
*/
@@ -694,7 +696,7 @@ index 7053a83..583d6da 100644
HostIFScheduleHRTimeout(ktime_t *expires) //IN:
{
struct hrtimer t;
-@@ -3091,7 +3100,7 @@ HostIFScheduleHRTimeout(ktime_t *expires) //IN:
+@@ -3093,7 +3100,7 @@ HostIFScheduleHRTimeout(ktime_t *expires) //IN:
if (hrtimer_active(&t)) {
schedule();
}
@@ -703,7 +705,7 @@ index 7053a83..583d6da 100644
hrtimer_cancel(&t);
__set_current_state(TASK_RUNNING);
}
-@@ -3114,7 +3123,7 @@ HostIFScheduleHRTimeout(ktime_t *expires) //IN:
+@@ -3116,7 +3123,7 @@ HostIFScheduleHRTimeout(ktime_t *expires) //IN:
* Side effects:
* none.
*
@@ -712,7 +714,7 @@ index 7053a83..583d6da 100644
*/
static long
-@@ -3147,7 +3156,7 @@ HostIFDoIoctl(struct file *filp,
+@@ -3149,7 +3156,7 @@ HostIFDoIoctl(struct file *filp,
*/
int
@@ -721,7 +723,7 @@ index 7053a83..583d6da 100644
unsigned int rate, //IN: current clock rate
struct file *filp) //IN: /dev/rtc descriptor
{
-@@ -3157,14 +3166,14 @@ HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
+@@ -3159,14 +3166,14 @@ HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
int timerPeriod;
if (rateChanged) {
@@ -738,7 +740,7 @@ index 7053a83..583d6da 100644
slack = timerPeriod / 100;
}
set_current_state(TASK_INTERRUPTIBLE);
-@@ -3510,7 +3519,7 @@ HostIF_MapUserMem(VA addr, // IN: User memory virtual address
+@@ -3512,7 +3519,7 @@ HostIF_MapUserMem(VA addr, // IN: User memory virtual address
printk(KERN_DEBUG "%s: p = 0x%p, offset = 0x%p, numPagesNeeded = %"FMTSZ"u,"
" handleSize = %"FMTSZ"u, mappedAddr = 0x%p\n",
@@ -747,7 +749,7 @@ index 7053a83..583d6da 100644
newHandle->numPages = numPagesNeeded;
newHandle->addr = mappedAddr;
-@@ -3546,7 +3555,7 @@ HostIF_UnmapUserMem(VMMappedUserMem *handle) // IN: Handle to mapped memory
+@@ -3548,7 +3555,7 @@ HostIF_UnmapUserMem(VMMappedUserMem *handle) // IN: Handle to mapped memory
}
printk(KERN_DEBUG "%s: numPages = %"FMTSZ"u, addr = 0x%p\n",
diff --git a/vmnet.patch b/vmnet.patch
index 9413d349ad81..7b3f07e10e8b 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -88,14 +88,16 @@ index 7e7ad99..5f508f6 100644
crc = 0xffffffff; /* init CRC for each address */
for (byte = 0; byte < ETH_ALEN; byte++) { /* for each address byte */
diff --git a/vmnet/userif.c b/vmnet/userif.c
-index 2b976d7..5298406 100644
+index 94146f6..5298406 100644
--- a/vmnet/userif.c
+++ b/vmnet/userif.c
-@@ -113,12 +113,18 @@ UserifLockPage(VA addr) // IN
+@@ -113,14 +113,18 @@ UserifLockPage(VA addr) // IN
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);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
+ retval = get_user_pages(addr,
@@ -113,7 +115,7 @@ index 2b976d7..5298406 100644
up_read(&current->mm->mmap_sem);
if (retval != 1) {
-@@ -182,13 +188,13 @@ VNetUserIfMapUint32Ptr(VA uAddr, // IN: pointer to user memory
+@@ -184,13 +188,13 @@ VNetUserIfMapUint32Ptr(VA uAddr, // IN: pointer to user memory
*
* Sets up notification by filling in pollPtr, actPtr, and recvClusterCount
* fields.
@@ -130,7 +132,7 @@ index 2b976d7..5298406 100644
* recvClusterPage are filled in VNetUserIf structure.
*
*-----------------------------------------------------------------------------
-@@ -278,8 +284,8 @@ VNetUserIfSetupNotify(VNetUserIF *userIf, // IN
+@@ -280,8 +284,8 @@ VNetUserIfSetupNotify(VNetUserIF *userIf, // IN
* VNetUserIfUnsetupNotify --
*
* Destroys permanent mapping for notify structure provided by user.
@@ -141,7 +143,7 @@ index 2b976d7..5298406 100644
* None.
*
* Side effects:
-@@ -333,7 +339,7 @@ VNetUserIfUnsetupNotify(VNetUserIF *userIf) // IN
+@@ -335,7 +339,7 @@ VNetUserIfUnsetupNotify(VNetUserIF *userIf) // IN
*
* Free the user interface port.
*
@@ -150,7 +152,7 @@ index 2b976d7..5298406 100644
* None.
*
* Side effects:
-@@ -355,7 +361,7 @@ VNetUserIfFree(VNetJack *this) // IN
+@@ -357,7 +361,7 @@ VNetUserIfFree(VNetJack *this) // IN
}
dev_kfree_skb(skb);
}
@@ -159,7 +161,7 @@ index 2b976d7..5298406 100644
if (userIf->pollPtr) {
VNetUserIfUnsetupNotify(userIf);
}
-@@ -379,7 +385,7 @@ VNetUserIfFree(VNetJack *this) // IN
+@@ -381,7 +385,7 @@ VNetUserIfFree(VNetJack *this) // IN
*
* This jack is receiving a packet. Take appropriate action.
*
@@ -168,7 +170,7 @@ index 2b976d7..5298406 100644
* None.
*
* Side effects:
-@@ -395,12 +401,12 @@ VNetUserIfReceive(VNetJack *this, // IN
+@@ -397,12 +401,12 @@ VNetUserIfReceive(VNetJack *this, // IN
VNetUserIF *userIf = (VNetUserIF*)this->private;
uint8 *dest = SKB_2_DESTMAC(skb);
unsigned long flags;
@@ -183,7 +185,7 @@ index 2b976d7..5298406 100644
if (!VNetPacketMatch(dest,
userIf->port.paddr,
(const uint8 *)userIf->port.exactFilter,
-@@ -410,12 +416,12 @@ VNetUserIfReceive(VNetJack *this, // IN
+@@ -412,12 +416,12 @@ VNetUserIfReceive(VNetJack *this, // IN
userIf->stats.droppedMismatch++;
goto drop_packet;
}
@@ -198,7 +200,7 @@ index 2b976d7..5298406 100644
if (skb->len > ETHER_MAX_QUEUED_PACKET) {
userIf->stats.droppedLargePacket++;
goto drop_packet;
-@@ -439,7 +445,7 @@ VNetUserIfReceive(VNetJack *this, // IN
+@@ -441,7 +445,7 @@ VNetUserIfReceive(VNetJack *this, // IN
wake_up(&userIf->waitQueue);
return;
@@ -207,7 +209,7 @@ index 2b976d7..5298406 100644
drop_packet:
dev_kfree_skb(skb);
}
-@@ -452,7 +458,7 @@ VNetUserIfReceive(VNetJack *this, // IN
+@@ -454,7 +458,7 @@ VNetUserIfReceive(VNetJack *this, // IN
*
* Callback for read operation on this userif entry in vnets proc fs.
*
@@ -216,7 +218,7 @@ index 2b976d7..5298406 100644
* Length of read operation.
*
* Side effects:
-@@ -471,21 +477,21 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
+@@ -473,21 +477,21 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
// read
void *data) // IN: client data - not used
{
@@ -244,7 +246,7 @@ index 2b976d7..5298406 100644
"dropped.down %u dropped.mismatch %u "
"dropped.overflow %u dropped.largePacket %u",
userIf->stats.droppedDown,
-@@ -494,7 +500,7 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
+@@ -496,7 +500,7 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
userIf->stats.droppedLargePacket);
len += sprintf(page+len, "\n");
@@ -253,7 +255,7 @@ index 2b976d7..5298406 100644
*start = 0;
*eof = 1;
return len;
-@@ -508,7 +514,7 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
+@@ -510,7 +514,7 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
*
* Copy part of datagram to userspace.
*
@@ -262,7 +264,7 @@ index 2b976d7..5298406 100644
* zero on success,
* -EFAULT if buffer is an invalid area
*
-@@ -545,12 +551,12 @@ VNetCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
+@@ -547,12 +551,12 @@ VNetCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
*
* Copy part of datagram to userspace doing checksum at same time.
*
@@ -277,7 +279,7 @@ index 2b976d7..5298406 100644
* folded checksum (non-negative value) on success,
* -EINVAL if offset is too big,
* -EFAULT if buffer is an invalid area
-@@ -572,7 +578,7 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
+@@ -574,7 +578,7 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
char *curr = buf;
const skb_frag_t *frag;
@@ -286,7 +288,7 @@ index 2b976d7..5298406 100644
* Something bad happened. We skip only up to skb->nh.raw, and skb->nh.raw
* must be in the header, otherwise we are in the big troubles.
*/
-@@ -629,7 +635,7 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
+@@ -631,7 +635,7 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
* Copy complete datagram to the user space. Fill correct checksum
* into the copied datagram if nobody did it yet.
*
@@ -295,7 +297,7 @@ index 2b976d7..5298406 100644
* On success byte count, on failure -EFAULT.
*
* Side effects:
-@@ -658,7 +664,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
+@@ -660,7 +664,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
size_t skl;
int csum;
u_int16_t csum16;
@@ -304,7 +306,7 @@ index 2b976d7..5298406 100644
skl = compat_skb_csum_start(skb);
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
-@@ -689,7 +695,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
+@@ -691,7 +695,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
* The virtual network's read file operation. Reads the next pending
* packet for this network connection.
*
@@ -313,7 +315,7 @@ index 2b976d7..5298406 100644
* On success the len of the packet received,
* else if no packet waiting and nonblocking 0,
* else -errno.
-@@ -700,7 +706,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
+@@ -702,7 +706,7 @@ VNetCopyDatagramToUser(const struct sk_buff *skb, // IN
*----------------------------------------------------------------------
*/
@@ -322,7 +324,7 @@ index 2b976d7..5298406 100644
VNetUserIfRead(VNetPort *port, // IN
struct file *filp, // IN
char *buf, // OUT
-@@ -768,7 +774,7 @@ VNetUserIfRead(VNetPort *port, // IN
+@@ -770,7 +774,7 @@ VNetUserIfRead(VNetPort *port, // IN
* The virtual network's write file operation. Send the raw packet
* to the network.
*
@@ -331,7 +333,7 @@ index 2b976d7..5298406 100644
* On success the count of bytes written else errno.
*
* Side effects:
-@@ -777,7 +783,7 @@ VNetUserIfRead(VNetPort *port, // IN
+@@ -779,7 +783,7 @@ VNetUserIfRead(VNetPort *port, // IN
*----------------------------------------------------------------------
*/
@@ -340,7 +342,7 @@ index 2b976d7..5298406 100644
VNetUserIfWrite(VNetPort *port, // IN
struct file *filp, // IN
const char *buf, // IN
-@@ -789,8 +795,8 @@ VNetUserIfWrite(VNetPort *port, // IN
+@@ -791,8 +795,8 @@ VNetUserIfWrite(VNetPort *port, // IN
/*
* Check size
*/
@@ -351,7 +353,7 @@ index 2b976d7..5298406 100644
count > ETHER_MAX_QUEUED_PACKET) {
return -EINVAL;
}
-@@ -807,25 +813,25 @@ VNetUserIfWrite(VNetPort *port, // IN
+@@ -809,25 +813,25 @@ VNetUserIfWrite(VNetPort *port, // IN
/*
* Allocate an sk_buff.
*/
@@ -382,7 +384,7 @@ index 2b976d7..5298406 100644
VNetSend(&userIf->port.jack, skb);
return count;
-@@ -839,7 +845,7 @@ VNetUserIfWrite(VNetPort *port, // IN
+@@ -841,7 +845,7 @@ VNetUserIfWrite(VNetPort *port, // IN
*
* XXX
*
@@ -391,7 +393,7 @@ index 2b976d7..5298406 100644
* 0 on success
* -errno on failure
*
-@@ -862,8 +868,8 @@ VNetUserIfIoctl(VNetPort *port, // IN
+@@ -864,8 +868,8 @@ VNetUserIfIoctl(VNetPort *port, // IN
return -EINVAL;
case SIOCSETNOTIFY2:
#ifdef VMX86_SERVER
@@ -402,7 +404,7 @@ index 2b976d7..5298406 100644
* the console os that are from the VMKernel address space which was the
* only case we used this.
*/
-@@ -906,20 +912,20 @@ VNetUserIfIoctl(VNetPort *port, // IN
+@@ -908,20 +912,20 @@ VNetUserIfIoctl(VNetPort *port, // IN
break;
case SIOCSIFFLAGS:
@@ -428,7 +430,7 @@ index 2b976d7..5298406 100644
spin_lock_irqsave(&q->lock, flags);
if (userIf->pollPtr) {
if (skb_queue_empty(q)) {
-@@ -936,11 +942,11 @@ VNetUserIfIoctl(VNetPort *port, // IN
+@@ -938,11 +942,11 @@ VNetUserIfIoctl(VNetPort *port, // IN
case SIOCINJECTLINKSTATE:
{
uint8 linkUpFromUser;
@@ -442,7 +444,7 @@ index 2b976d7..5298406 100644
if (linkUpFromUser != 0 && linkUpFromUser != 1) {
return -EINVAL;
}
-@@ -952,7 +958,7 @@ VNetUserIfIoctl(VNetPort *port, // IN
+@@ -954,7 +958,7 @@ VNetUserIfIoctl(VNetPort *port, // IN
return -ENOIOCTLCMD;
break;
}
@@ -451,7 +453,7 @@ index 2b976d7..5298406 100644
return 0;
}
-@@ -964,7 +970,7 @@ VNetUserIfIoctl(VNetPort *port, // IN
+@@ -966,7 +970,7 @@ VNetUserIfIoctl(VNetPort *port, // IN
*
* The virtual network's file poll operation.
*
@@ -460,7 +462,7 @@ index 2b976d7..5298406 100644
* Return POLLIN if success, else sleep and return 0.
* FIXME: Should not we always return POLLOUT?
*
-@@ -980,7 +986,7 @@ VNetUserIfPoll(VNetPort *port, // IN
+@@ -982,7 +986,7 @@ VNetUserIfPoll(VNetPort *port, // IN
poll_table *wait) // IN
{
VNetUserIF *userIf = (VNetUserIF*)port->jack.private;
@@ -469,7 +471,7 @@ index 2b976d7..5298406 100644
poll_wait(filp, &userIf->waitQueue, wait);
if (!skb_queue_empty(&userIf->packetQueue)) {
return POLLIN;
-@@ -995,8 +1001,8 @@ VNetUserIfPoll(VNetPort *port, // IN
+@@ -997,8 +1001,8 @@ VNetUserIfPoll(VNetPort *port, // IN
* VNetUserIfSetUplinkState --
*
* Sends link state change event.
@@ -480,7 +482,7 @@ index 2b976d7..5298406 100644
* 0 on success, errno on failure.
*
* Side effects:
-@@ -1038,7 +1044,7 @@ VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)
+@@ -1040,7 +1044,7 @@ VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)
event.header.eventId = 0;
event.header.classSet = VNET_EVENT_CLASS_UPLINK;
event.header.type = VNET_EVENT_TYPE_LINK_STATE;
@@ -489,7 +491,7 @@ index 2b976d7..5298406 100644
* XXX kind of a hack, vmx will coalesce linkup/down if they come from the
* same adapter.
*/
-@@ -1063,8 +1069,8 @@ VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)
+@@ -1065,8 +1069,8 @@ VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)
*
* Create a user level port to the wonderful world of virtual
* networking.
@@ -500,7 +502,7 @@ index 2b976d7..5298406 100644
* Errno. Also returns an allocated port to connect to,
* NULL on error.
*
-@@ -1080,7 +1086,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
+@@ -1082,7 +1086,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
VNetUserIF *userIf;
static unsigned id = 0;
int retval;
@@ -509,7 +511,7 @@ index 2b976d7..5298406 100644
userIf = kmalloc(sizeof *userIf, GFP_USER);
if (!userIf) {
return -ENOMEM;
-@@ -1089,7 +1095,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
+@@ -1091,7 +1095,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
/*
* Initialize fields.
*/
@@ -518,7 +520,7 @@ index 2b976d7..5298406 100644
userIf->port.id = id++;
userIf->port.jack.peer = NULL;
-@@ -1134,7 +1140,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
+@@ -1136,7 +1140,7 @@ VNetUserIf_Create(VNetPort **ret) // OUT
/*
* Rest of fields.
*/
@@ -527,7 +529,7 @@ index 2b976d7..5298406 100644
userIf->port.flags = IFF_RUNNING;
memset(userIf->port.paddr, 0, sizeof userIf->port.paddr);
-@@ -1147,12 +1153,12 @@ VNetUserIf_Create(VNetPort **ret) // OUT
+@@ -1149,12 +1153,12 @@ VNetUserIf_Create(VNetPort **ret) // OUT
userIf->port.fileOpWrite = VNetUserIfWrite;
userIf->port.fileOpIoctl = VNetUserIfIoctl;
userIf->port.fileOpPoll = VNetUserIfPoll;