summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2013-06-23 15:15:49 +0200
committerAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2013-06-23 15:15:49 +0200
commit01c6195e9e984d8c9c29b3a959c3bb769ae0f472 (patch)
tree9d66f30008b0a0bd2b0fcf4af52a9e95282108c8 /app-emulation/vmware-modules
parentDrop all but newest version, identical to main tree (diff)
downloadvmware-01c6195e9e984d8c9c29b3a959c3bb769ae0f472.tar.gz
vmware-01c6195e9e984d8c9c29b3a959c3bb769ae0f472.tar.bz2
vmware-01c6195e9e984d8c9c29b3a959c3bb769ae0f472.zip
Dropped vmware-modules, identical to main tree
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/files/208-sema.patch92
-rw-r--r--app-emulation/vmware-modules/files/208-sk_sleep.patch74
-rw-r--r--app-emulation/vmware-modules/files/208-unlocked_ioctl.patch33
-rw-r--r--app-emulation/vmware-modules/files/238-2.6.39.patch243
-rw-r--r--app-emulation/vmware-modules/files/238-3.2.0.patch103
-rw-r--r--app-emulation/vmware-modules/files/238-d-make-root.patch14
-rw-r--r--app-emulation/vmware-modules/files/238-jobserver.patch75
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-include.patch65
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch80
-rw-r--r--app-emulation/vmware-modules/files/238-netdevice.patch24
-rw-r--r--app-emulation/vmware-modules/files/238-sema.patch83
-rw-r--r--app-emulation/vmware-modules/files/238-unlocked_ioctl.patch33
-rw-r--r--app-emulation/vmware-modules/files/264-3.2.0.patch86
-rw-r--r--app-emulation/vmware-modules/files/264-apic.patch12
-rw-r--r--app-emulation/vmware-modules/files/264-d-make-root.patch16
-rw-r--r--app-emulation/vmware-modules/files/264-jobserver.patch75
-rw-r--r--app-emulation/vmware-modules/files/264-makefile-include.patch65
-rw-r--r--app-emulation/vmware-modules/files/264-makefile-kernel-dir.patch80
-rw-r--r--app-emulation/vmware-modules/files/264-netdevice.patch24
-rw-r--r--app-emulation/vmware-modules/files/264-putname.patch13
-rw-r--r--app-emulation/vmware-modules/files/271-apic.patch12
-rw-r--r--app-emulation/vmware-modules/files/271-makefile-include.patch65
-rw-r--r--app-emulation/vmware-modules/files/271-makefile-kernel-dir.patch85
-rw-r--r--app-emulation/vmware-modules/files/271-netdevice.patch24
-rw-r--r--app-emulation/vmware-modules/files/271-putname.patch13
-rw-r--r--app-emulation/vmware-modules/files/271-vmmon.patch44
-rw-r--r--app-emulation/vmware-modules/files/hardened.patch170
-rw-r--r--app-emulation/vmware-modules/files/iommu_map.patch41
-rw-r--r--app-emulation/vmware-modules/files/sk_sleep.patch242
-rw-r--r--app-emulation/vmware-modules/metadata.xml8
-rw-r--r--app-emulation/vmware-modules/vmware-modules-238.6.ebuild84
-rw-r--r--app-emulation/vmware-modules/vmware-modules-264.5.ebuild83
-rw-r--r--app-emulation/vmware-modules/vmware-modules-271.2.ebuild82
33 files changed, 0 insertions, 2243 deletions
diff --git a/app-emulation/vmware-modules/files/208-sema.patch b/app-emulation/vmware-modules/files/208-sema.patch
deleted file mode 100644
index cbfbe9a..0000000
--- a/app-emulation/vmware-modules/files/208-sema.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-diff --git a/vmci-only/include/compat_semaphore.h b/vmci-only/include/compat_semaphore.h
-index f5527b9..bc37afd 100644
---- a/vmci-only/include/compat_semaphore.h
-+++ b/vmci-only/include/compat_semaphore.h
-@@ -45,5 +45,13 @@
- #endif
- #endif
-
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
-+ #ifndef DECLARE_MUTEX
-+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
-+ #endif
-+ #ifndef init_MUTEX
-+ #define init_MUTEX(_m) sema_init(_m,1)
-+ #endif
-+#endif
-
- #endif /* __COMPAT_SEMAPHORE_H__ */
-diff --git a/vmmon-only/include/compat_semaphore.h b/vmmon-only/include/compat_semaphore.h
-index f5527b9..bc37afd 100644
---- a/vmmon-only/include/compat_semaphore.h
-+++ b/vmmon-only/include/compat_semaphore.h
-@@ -45,5 +45,13 @@
- #endif
- #endif
-
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
-+ #ifndef DECLARE_MUTEX
-+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
-+ #endif
-+ #ifndef init_MUTEX
-+ #define init_MUTEX(_m) sema_init(_m,1)
-+ #endif
-+#endif
-
- #endif /* __COMPAT_SEMAPHORE_H__ */
-diff --git a/vmnet-only/compat_semaphore.h b/vmnet-only/compat_semaphore.h
-index f5527b9..548782d 100644
---- a/vmnet-only/compat_semaphore.h
-+++ b/vmnet-only/compat_semaphore.h
-@@ -45,5 +45,14 @@
- #endif
- #endif
-
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
-+ #ifndef DECLARE_MUTEX
-+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
-+ #endif
-+ #ifndef init_MUTEX
-+ #define init_MUTEX(_m) sema_init(_m,1)
-+ #endif
-+#endif
-+
-
- #endif /* __COMPAT_SEMAPHORE_H__ */
-diff --git a/vmnet-only/vnetFilter.h b/vmnet-only/vnetFilter.h
-index fe5c71f..303009f 100644
---- a/vmnet-only/vnetFilter.h
-+++ b/vmnet-only/vnetFilter.h
-@@ -203,5 +203,13 @@ struct VNet_SetLogLevel {
- }
- #include "vmware_pack_end.h"
- VNet_SetLogLevel;
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
-+ #ifndef DECLARE_MUTEX
-+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
-+ #endif
-+ #ifndef init_MUTEX
-+ #define init_MUTEX(_m) sema_init(_m,1)
-+ #endif
-+#endif
-
- #endif // ifndef _VNETFILTER_H_
-diff --git a/vsock-only/linux/af_vsock.h b/vsock-only/linux/af_vsock.h
-index 3a8a0ce..d36b2ae 100644
---- a/vsock-only/linux/af_vsock.h
-+++ b/vsock-only/linux/af_vsock.h
-@@ -88,4 +88,14 @@ typedef struct VSockVmciSock {
- #endif
- } VSockVmciSock;
-
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
-+ #ifndef DECLARE_MUTEX
-+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
-+ #endif
-+ #ifndef init_MUTEX
-+ #define init_MUTEX(_m) sema_init(_m,1)
-+ #endif
-+#endif
-+
-+
- #endif /* __AF_VSOCK_H__ */
diff --git a/app-emulation/vmware-modules/files/208-sk_sleep.patch b/app-emulation/vmware-modules/files/208-sk_sleep.patch
deleted file mode 100644
index d92dd7c..0000000
--- a/app-emulation/vmware-modules/files/208-sk_sleep.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff --git a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c
-index 314e5fb..bd69539 100644
---- a/vsock-only/linux/af_vsock.c
-+++ b/vsock-only/linux/af_vsock.c
-@@ -3150,5 +3150,5 @@ VSockVmciStreamConnect(struct socket *sock, // IN
- */
- timeout = sock_sndtimeo(sk, flags & O_NONBLOCK);
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while (sk->compat_sk_state != SS_CONNECTED && sk->compat_sk_err == 0) {
-@@ -3173,5 +3173,5 @@ VSockVmciStreamConnect(struct socket *sock, // IN
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
- }
-
-@@ -3185,5 +3185,5 @@ VSockVmciStreamConnect(struct socket *sock, // IN
-
- outWait:
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
-@@ -3392,5 +3392,5 @@ VSockVmciPoll(struct file *file, // IN
- sk = sock->sk;
-
-- poll_wait(file, sk->compat_sk_sleep, wait);
-+ poll_wait(file, compat_sk_sleep(sk), wait);
- mask = 0;
-
-@@ -3993,5 +3993,5 @@ VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
- */
- timeout = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while (totalWritten < len) {
-@@ -4032,5 +4032,5 @@ VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep,
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk),
- &wait, TASK_INTERRUPTIBLE);
- }
-@@ -4115,5 +4115,5 @@ outWait:
- err = totalWritten;
- }
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
-@@ -4338,5 +4338,5 @@ VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
- copied = 0;
-
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while ((ready = VMCIQueue_BufReady(vsk->consumeQ,
-@@ -4381,5 +4381,5 @@ VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
- }
-
-@@ -4473,5 +4473,5 @@ VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
-
- outWait:
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
diff --git a/app-emulation/vmware-modules/files/208-unlocked_ioctl.patch b/app-emulation/vmware-modules/files/208-unlocked_ioctl.patch
deleted file mode 100644
index 62ae5e8..0000000
--- a/app-emulation/vmware-modules/files/208-unlocked_ioctl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
-index bf93446..022e856 100644
---- a/vmmon-only/linux/driver.c
-+++ b/vmmon-only/linux/driver.c
-@@ -169,6 +169,7 @@ static int LinuxDriver_Open(struct inode *inode, struct file *filp);
- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
-+#define VMW_HAVE_UNLOCKED_IOCTL
- static long LinuxDriver_UnlockedIoctl(struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #endif
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index 8104878..02bb71c 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -3411,7 +3411,7 @@ HostIFDoIoctl(struct file *filp,
- if (filp->f_op->unlocked_ioctl) {
- return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg);
- }
--#endif
-+#else
- if (filp->f_op->ioctl) {
- long err;
-
-@@ -3420,6 +3420,7 @@ HostIFDoIoctl(struct file *filp,
- unlock_kernel();
- return err;
- }
-+#endif
- return -ENOIOCTLCMD;
- }
-
diff --git a/app-emulation/vmware-modules/files/238-2.6.39.patch b/app-emulation/vmware-modules/files/238-2.6.39.patch
deleted file mode 100644
index 88873e5..0000000
--- a/app-emulation/vmware-modules/files/238-2.6.39.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-diff --git a/vmblock-only/linux/dentry.c b/vmblock-only/linux/dentry.c
-index 66537c8..05ea95a 100644
---- a/vmblock-only/linux/dentry.c
-+++ b/vmblock-only/linux/dentry.c
-@@ -104,7 +104,7 @@ DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
- return actualDentry->d_op->d_revalidate(actualDentry, nd);
- }
-
-- if (path_lookup(iinfo->name, 0, &actualNd)) {
-+ if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
- LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
- return 0;
- }
-diff --git a/vmblock-only/linux/filesystem.c b/vmblock-only/linux/filesystem.c
-index 53840fd..bc117c5 100644
---- a/vmblock-only/linux/filesystem.c
-+++ b/vmblock-only/linux/filesystem.c
-@@ -66,7 +66,6 @@ static size_t fsRootLen;
- static struct file_system_type fsType = {
- .owner = THIS_MODULE,
- .name = VMBLOCK_FS_NAME,
-- .get_sb = FsOpGetSb,
- .kill_sb = kill_anon_super,
- };
-
-@@ -553,7 +552,7 @@ FsOpReadSuper(struct super_block *sb, // OUT: Superblock object
- *-----------------------------------------------------------------------------
- */
-
--static int
-+/*static int
- FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
- int flags, // IN: mount flags
- const char *dev_name, // IN: device mounting on
-@@ -561,7 +560,7 @@ FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
- struct vfsmount *mnt) // IN: vfs mount
- {
- return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
--}
-+}*/
- #else
- /*
- *-----------------------------------------------------------------------------
-diff --git a/vmblock-only/shared/compat_namei.h b/vmblock-only/shared/compat_namei.h
-index 28d72c8..4214247 100644
---- a/vmblock-only/shared/compat_namei.h
-+++ b/vmblock-only/shared/compat_namei.h
-@@ -40,8 +40,11 @@
- #define compat_path_release(nd) path_release(nd)
- #endif
-
-+/* path_lookup was removed in 2.6.39 merge window VFS merge */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
-+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
- /* path_lookup was exported in 2.4.25 */
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
- #define compat_path_lookup(path, flags, nd) path_lookup(path, flags, nd)
- #else
- #define compat_path_lookup(path, flags, nd) \
-diff --git a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
-index a0f5498..49795e1 100644
---- a/vmci-only/linux/driver.c
-+++ b/vmci-only/linux/driver.c
-@@ -42,7 +42,6 @@ sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
- #include <linux/miscdevice.h>
- #include <linux/poll.h>
- #include <linux/smp.h>
--#include <linux/smp_lock.h>
-
- #include "compat_file.h"
- #include "compat_highmem.h"
-diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
-index a33c983..89f8827 100644
---- a/vmmon-only/linux/driver.c
-+++ b/vmmon-only/linux/driver.c
-@@ -781,7 +781,7 @@ LinuxDriver_Close(struct inode *inode, // IN
-
-
- #define POLLQUEUE_MAX_TASK 1000
--static spinlock_t pollQueueLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
-+static DEFINE_SPINLOCK(pollQueueLock);
- static void *pollQueue[POLLQUEUE_MAX_TASK];
- static unsigned int pollQueueCount = 0;
-
-@@ -1042,7 +1042,8 @@ LinuxDriverPoll(struct file *filp,
- * but unfortunately there is no way how to detect that
- * we are building for RedHat's kernel...
- */
-- static spinlock_t timerLock = SPIN_LOCK_UNLOCKED;
-+
-+ static DEFINE_SPINLOCK(timerLock);
-
- spin_lock(&timerLock);
- mod_timer(&linuxState.pollTimer, jiffies + 1);
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index 6c7b34d..fabb44d 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -46,7 +46,6 @@
- #include <linux/mman.h>
-
- #include <linux/smp.h>
--#include <linux/smp_lock.h>
-
- #include <asm/io.h>
- #include <linux/mc146818rtc.h>
-diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c
-index f64e80a..b0ee013 100644
---- a/vmmon-only/linux/iommu.c
-+++ b/vmmon-only/linux/iommu.c
-@@ -44,7 +44,7 @@ typedef struct PassthruDevice {
-
-
- static LIST_HEAD(passthruDeviceList);
--static spinlock_t passthruDeviceListLock = SPIN_LOCK_UNLOCKED;
-+static DEFINE_SPINLOCK(passthruDeviceListLock);
- static void *pciHolePage = NULL;
-
- /*
-diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
-index c91a1dc..4c195e1 100644
---- a/vmnet-only/driver.c
-+++ b/vmnet-only/driver.c
-@@ -28,7 +28,6 @@
- #include <linux/poll.h>
-
- #include <linux/smp.h>
--#include <linux/smp_lock.h>
-
- #include <linux/netdevice.h>
- #include <linux/etherdevice.h>
-@@ -105,7 +104,7 @@ const uint8 broadcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- * not have vnetStructureMutex already acquired,
- * it is most certainly a bug.
- */
--static rwlock_t vnetPeerLock = RW_LOCK_UNLOCKED;
-+static DEFINE_RWLOCK(vnetPeerLock);
-
- /*
- * All concurrent changes to the network structure are
-@@ -115,6 +114,7 @@ static rwlock_t vnetPeerLock = RW_LOCK_UNLOCKED;
- * vnetStructureMutex and vnetPeerLock for write.
- */
- compat_define_mutex(vnetStructureMutex);
-+compat_define_mutex(vnetMutex);
-
- #if defined(VM_X86_64) && !defined(HAVE_COMPAT_IOCTL)
- /*
-@@ -264,11 +264,11 @@ LinuxDriver_Ioctl32_Handler(unsigned int fd, // IN: (unused)
- struct file * filp) // IN:
- {
- int ret = -ENOTTY;
-- lock_kernel();
-+ compat_mutex_lock(&vnetMutex);
- if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
- ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
- }
-- unlock_kernel();
-+ compat_mutex_unlock(&vnetMutex);
- return ret;
- }
-
-@@ -1134,9 +1134,9 @@ VNetFileOpUnlockedIoctl(struct file *filp, // IN:
- if (filp && filp->f_dentry) {
- inode = filp->f_dentry->d_inode;
- }
-- lock_kernel();
-+ compat_mutex_lock(&vnetMutex);
- err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
-- unlock_kernel();
-+ compat_mutex_unlock(&vnetMutex);
- return err;
- }
- #endif
-diff --git a/vmnet-only/filter.c b/vmnet-only/filter.c
-index 34b7d3d..b0017d7 100644
---- a/vmnet-only/filter.c
-+++ b/vmnet-only/filter.c
-@@ -85,7 +85,7 @@ static compat_define_mutex(filterIoctlMutex); /* serialize ioctl()s from user sp
- * callbacks can be concurrently executing on multiple threads on multiple
- * CPUs, so we should revisit locking for allowing for that in the future.
- */
--spinlock_t activeRuleLock = SPIN_LOCK_UNLOCKED;
-+DEFINE_SPINLOCK(activeRuleLock);
-
- /*
- * Logging.
-diff --git a/vmnet-only/hub.c b/vmnet-only/hub.c
-index b05efea..38d9aef 100644
---- a/vmnet-only/hub.c
-+++ b/vmnet-only/hub.c
-@@ -81,7 +81,7 @@ static VNetHub *vnetHub = NULL;
- * so we use __attribute__((unused)) to quiet the compiler.
- */
-
--static spinlock_t vnetHubLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
-+static DEFINE_SPINLOCK(vnetHubLock);
-
-
- /*
-diff --git a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c
-index ecd057e..d565ec0 100644
---- a/vsock-only/linux/af_vsock.c
-+++ b/vsock-only/linux/af_vsock.c
-@@ -102,7 +102,6 @@
- #include <linux/miscdevice.h>
- #include <linux/poll.h>
- #include <linux/smp.h>
--#include <linux/smp_lock.h>
- #include <asm/io.h>
- #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
- # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-diff --git a/vsock-only/linux/util.c b/vsock-only/linux/util.c
-index 53f2edb..32a7da7 100644
---- a/vsock-only/linux/util.c
-+++ b/vsock-only/linux/util.c
-@@ -34,7 +34,7 @@
- struct list_head vsockBindTable[VSOCK_HASH_SIZE + 1];
- struct list_head vsockConnectedTable[VSOCK_HASH_SIZE];
-
--spinlock_t vsockTableLock = SPIN_LOCK_UNLOCKED;
-+DEFINE_SPINLOCK(vsockTableLock);
-
- /*
- * snprintf() wasn't exported until 2.4.10: fall back on sprintf in those
-diff --git a/vsock-only/shared/compat_namei.h b/vsock-only/shared/compat_namei.h
-index 28d72c8..4214247 100644
---- a/vsock-only/shared/compat_namei.h
-+++ b/vsock-only/shared/compat_namei.h
-@@ -40,8 +40,11 @@
- #define compat_path_release(nd) path_release(nd)
- #endif
-
-+/* path_lookup was removed in 2.6.39 merge window VFS merge */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
-+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
- /* path_lookup was exported in 2.4.25 */
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
- #define compat_path_lookup(path, flags, nd) path_lookup(path, flags, nd)
- #else
- #define compat_path_lookup(path, flags, nd) \
diff --git a/app-emulation/vmware-modules/files/238-3.2.0.patch b/app-emulation/vmware-modules/files/238-3.2.0.patch
deleted file mode 100644
index 0416214..0000000
--- a/app-emulation/vmware-modules/files/238-3.2.0.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c
-index b0ee013..f0f5c9a 100644
---- a/vmmon-only/linux/iommu.c
-+++ b/vmmon-only/linux/iommu.c
-@@ -36,6 +36,12 @@
- #define PCI_BDF_SLOTFUNC(bdf) PCI_DEVFN(PCI_SLOT(bdf), PCI_FUNC(bdf))
- #define PCI_BDF_BUS(bdf) (((bdf) >> 8) & 0xff)
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+#include <linux/pci.h>
-+#define iommu_found() iommu_present(&pci_bus_type)
-+#define iommu_domain_alloc() iommu_domain_alloc(&pci_bus_type)
-+#endif
-+
- typedef struct PassthruDevice {
- struct pci_dev *pdev;
- VMLinux *vmLinux;
-diff --git a/vmnet-only/filter.c b/vmnet-only/filter.c
-index b0017d7..6c0687f 100644
---- a/vmnet-only/filter.c
-+++ b/vmnet-only/filter.c
-@@ -41,6 +41,10 @@
- #include "vnetInt.h"
- #include "vmnetInt.h"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+#include <linux/export.h>
-+#endif
-+
- // VNet_FilterLogPacket.action for dropped packets
- #define VNET_FILTER_ACTION_DRP (1)
- #define VNET_FILTER_ACTION_DRP_SHORT (2)
-diff --git a/vmnet-only/netif.c b/vmnet-only/netif.c
-index b3c752b..79d4896 100644
---- a/vmnet-only/netif.c
-+++ b/vmnet-only/netif.c
-@@ -62,7 +62,9 @@ static int VNetNetifClose(struct net_device *dev);
- static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev);
- static struct net_device_stats *VNetNetifGetStats(struct net_device *dev);
- static int VNetNetifSetMAC(struct net_device *dev, void *addr);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- static void VNetNetifSetMulticast(struct net_device *dev);
-+#endif
- #if 0
- static void VNetNetifTxTimeout(struct net_device *dev);
- #endif
-@@ -131,7 +133,9 @@ VNetNetIfSetup(struct net_device *dev) // IN:
- .ndo_stop = VNetNetifClose,
- .ndo_get_stats = VNetNetifGetStats,
- .ndo_set_mac_address = VNetNetifSetMAC,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- .ndo_set_multicast_list = VNetNetifSetMulticast,
-+#endif
- /*
- * We cannot stuck... If someone will report problems under
- * low memory conditions or some such, we should enable it.
-@@ -152,7 +156,9 @@ VNetNetIfSetup(struct net_device *dev) // IN:
- dev->stop = VNetNetifClose;
- dev->get_stats = VNetNetifGetStats;
- dev->set_mac_address = VNetNetifSetMAC;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- dev->set_multicast_list = VNetNetifSetMulticast;
-+#endif
- /*
- * We cannot stuck... If someone will report problems under
- * low memory conditions or some such, we should enable it.
-@@ -621,11 +627,12 @@ VNetNetifSetMAC(struct net_device *dev, // IN:
- *----------------------------------------------------------------------
- */
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- void
- VNetNetifSetMulticast(struct net_device *dev) // IN: unused
- {
- }
--
-+#endif
-
- /*
- *----------------------------------------------------------------------
-diff --git a/vmnet-only/userif.c b/vmnet-only/userif.c
-index 4e65c76..fd12aa9 100644
---- a/vmnet-only/userif.c
-+++ b/vmnet-only/userif.c
-@@ -572,10 +572,18 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
- unsigned int tmpCsum;
- const void *vaddr;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+ vaddr = kmap(skb_frag_page(frag));
-+#else
- vaddr = kmap(frag->page);
-+#endif
- tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
- curr, frag->size, 0, &err);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+ kunmap(skb_frag_page(frag));
-+#else
- kunmap(frag->page);
-+#endif
- if (err) {
- return err;
- }
diff --git a/app-emulation/vmware-modules/files/238-d-make-root.patch b/app-emulation/vmware-modules/files/238-d-make-root.patch
deleted file mode 100644
index 7e83a1e..0000000
--- a/app-emulation/vmware-modules/files/238-d-make-root.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/vmblock-only/linux/filesystem.c 2012-05-23 20:08:00.632051396 -0500
-+++ b/vmblock-only/linux/filesystem.c 2012-05-23 20:17:00.896297163 -0500
-@@ -517,7 +517,11 @@
- return -EINVAL;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
- rootDentry = d_alloc_root(rootInode);
-+#else
-+ rootDentry = d_make_root(rootInode);
-+#endif
- if (!rootDentry) {
- iput(rootInode);
- return -ENOMEM;
diff --git a/app-emulation/vmware-modules/files/238-jobserver.patch b/app-emulation/vmware-modules/files/238-jobserver.patch
deleted file mode 100644
index 59a6ccc..0000000
--- a/app-emulation/vmware-modules/files/238-jobserver.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -ru a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
---- a/work/vmblock-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmblock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmci-only/Makefile b/work/vmci-only/Makefile
---- a/work/vmci-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmci-only/Makefile 2011-01-22 09:13:55.898936002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
---- a/work/vmmon-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmmon-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
---- a/work/vmnet-only/Makefile 2011-01-22 08:59:15.911150002 -0500
-+++ b/work/vmnet-only/Makefile 2011-01-22 09:13:55.898936002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vsock-only/Makefile b/work/vsock-only/Makefile
---- a/work/vsock-only/Makefile 2011-01-22 08:59:15.911150002 -0500
-+++ b/work/vsock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
diff --git a/app-emulation/vmware-modules/files/238-makefile-include.patch b/app-emulation/vmware-modules/files/238-makefile-include.patch
deleted file mode 100644
index 777a3fd..0000000
--- a/app-emulation/vmware-modules/files/238-makefile-include.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff --git a/work/vmblock-only/Makefile.kernel b/work/vmblock-only/Makefile.kernel
-index 9d7c5ca..92cefff 100644
---- a/work/vmblock-only/Makefile.kernel
-+++ b/work/vmblock-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE += -I$(SRCROOT)/include
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
-diff --git a/work/vmci-only/Makefile.kernel b/work/vmci-only/Makefile.kernel
-index 22dc232..67e709f 100644
---- a/work/vmci-only/Makefile.kernel
-+++ b/work/vmci-only/Makefile.kernel
-@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
-
- INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
-
-diff --git a/work/vmmon-only/Makefile.kernel b/work/vmmon-only/Makefile.kernel
-index a7e26ea..befaca7 100644
---- a/work/vmmon-only/Makefile.kernel
-+++ b/work/vmmon-only/Makefile.kernel
-@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
- INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
- -I$(SRCROOT)/vmcore
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
-diff --git a/work/vmnet-only/Makefile.kernel b/work/vmnet-only/Makefile.kernel
-index 4b16d06..0e252a6 100644
---- a/work/vmnet-only/Makefile.kernel
-+++ b/work/vmnet-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE := -I$(SRCROOT)
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
-diff --git a/work/vsock-only/Makefile.kernel b/work/vsock-only/Makefile.kernel
-index 47ef5f3..b3539ef 100644
---- a/work/vsock-only/Makefile.kernel
-+++ b/work/vsock-only/Makefile.kernel
-@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
- INCLUDE += -I$(SRCROOT)/linux
- INCLUDE += -I$(SRCROOT)/common
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
-
diff --git a/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
deleted file mode 100644
index d4bd6d1..0000000
--- a/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
-index 0bd0e74..27c3ede 100644
---- a/work/vmblock-only/Makefile
-+++ b/work/vmblock-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmblock
- PRODUCT := tools
-diff --git a/work/vmci-only/Makefile b/work/vmci-only/Makefile
-index 7babb8a..fbc5878 100644
---- a/work/vmci-only/Makefile
-+++ b/work/vmci-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmci
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
-index 4b4eb3e..1bb35ef 100644
---- a/work/vmmon-only/Makefile
-+++ b/work/vmmon-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmmon
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
-index 06856e7..fd53bf8 100644
---- a/work/vmnet-only/Makefile
-+++ b/work/vmnet-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmnet
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vsock-only/Makefile b/work/vsock-only/Makefile
-index e02adb0..210e502 100644
---- a/work/vsock-only/Makefile
-+++ b/work/vsock-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vsock
- PRODUCT := ws
diff --git a/app-emulation/vmware-modules/files/238-netdevice.patch b/app-emulation/vmware-modules/files/238-netdevice.patch
deleted file mode 100644
index 35231a3..0000000
--- a/app-emulation/vmware-modules/files/238-netdevice.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
-index 7a56304..9ff4548 100644
---- a/vmnet-only/compat_netdevice.h
-+++ b/vmnet-only/compat_netdevice.h
-@@ -47,6 +47,19 @@
- # define net_device device
- #endif
-
-+/* it looks like these have been removed from the kernel 3.1
-+ * probably because the "transition" is considered complete.
-+ * so to keep this source compatible we just redefine them like they were
-+ * previously
-+ */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
-+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
-+ functions are available. */
-+#define HAVE_FREE_NETDEV /* free_netdev() */
-+#define HAVE_NETDEV_PRIV /* netdev_priv() */
-+#define HAVE_NETIF_QUEUE
-+#define HAVE_NET_DEVICE_OPS
-+#endif
-
- /*
- * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
diff --git a/app-emulation/vmware-modules/files/238-sema.patch b/app-emulation/vmware-modules/files/238-sema.patch
deleted file mode 100644
index 1ebdab7..0000000
--- a/app-emulation/vmware-modules/files/238-sema.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
---- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500
-+++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
- #endif
-
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
-+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
-
-diff -ru original//vmmon-only/linux/driver.c patched//vmmon-only/linux/driver.c
---- original//vmmon-only/linux/driver.c 2010-11-11 15:37:22.000000000 -0500
-+++ patched//vmmon-only/linux/driver.c 2010-11-29 23:09:16.000000000 -0500
-@@ -145,7 +145,7 @@
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
- (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
--# define kernel_locked_by_current() kernel_locked()
-+# define kernel_locked_by_current() (current->lock_depth >= 0)
- #else
- # define kernel_locked_by_current() 0
- #endif
-@@ -170,6 +170,7 @@
- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
-+#define VMW_HAVE_UNLOCKED_IOCTL
- static long LinuxDriver_UnlockedIoctl(struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #endif
-diff -ru original//vmnet-only/compat_semaphore.h patched//vmnet-only/compat_semaphore.h
---- original//vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500
-+++ patched//vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
- #endif
-
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
-+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
-
-diff -ru original//vsock-only/shared/compat_semaphore.h patched//vsock-only/shared/compat_semaphore.h
---- original//vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500
-+++ patched//vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
- #endif
-
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
-+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
-+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
-
diff --git a/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch b/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch
deleted file mode 100644
index 3f1cd03..0000000
--- a/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
-index 1a0e753..089aba3 100644
---- a/vmmon-only/linux/driver.c
-+++ b/vmmon-only/linux/driver.c
-@@ -170,6 +170,7 @@ static int LinuxDriver_Open(struct inode *inode, struct file *filp);
- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
-+#define VMW_HAVE_UNLOCKED_IOCTL
- static long LinuxDriver_UnlockedIoctl(struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #endif
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index 5847323..9042b97 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -3702,7 +3702,7 @@ HostIFDoIoctl(struct file *filp,
- if (filp->f_op->unlocked_ioctl) {
- return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg);
- }
--#endif
-+#else
- if (filp->f_op->ioctl) {
- long err;
-
-@@ -3712,6 +3712,7 @@ HostIFDoIoctl(struct file *filp,
-
- return err;
- }
-+#endif
-
- return -ENOIOCTLCMD;
- }
diff --git a/app-emulation/vmware-modules/files/264-3.2.0.patch b/app-emulation/vmware-modules/files/264-3.2.0.patch
deleted file mode 100644
index 87f8914..0000000
--- a/app-emulation/vmware-modules/files/264-3.2.0.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff --git a/vmnet-only/filter.c b/vmnet-only/filter.c
-index 491add5..74f7a3b 100644
---- a/vmnet-only/filter.c
-+++ b/vmnet-only/filter.c
-@@ -40,6 +40,10 @@
- #include "vnetInt.h"
- #include "vmnetInt.h"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+#include <linux/export.h>
-+#endif
-+
- // VNet_FilterLogPacket.action for dropped packets
- #define VNET_FILTER_ACTION_DRP (1)
- #define VNET_FILTER_ACTION_DRP_SHORT (2)
-diff --git a/vmnet-only/netif.c b/vmnet-only/netif.c
-index 4bdb643..5b71339 100644
---- a/vmnet-only/netif.c
-+++ b/vmnet-only/netif.c
-@@ -62,7 +62,9 @@ static int VNetNetifClose(struct net_device *dev);
- static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev);
- static struct net_device_stats *VNetNetifGetStats(struct net_device *dev);
- static int VNetNetifSetMAC(struct net_device *dev, void *addr);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- static void VNetNetifSetMulticast(struct net_device *dev);
-+#endif
- #if 0
- static void VNetNetifTxTimeout(struct net_device *dev);
- #endif
-@@ -131,7 +133,9 @@ VNetNetIfSetup(struct net_device *dev) // IN:
- .ndo_stop = VNetNetifClose,
- .ndo_get_stats = VNetNetifGetStats,
- .ndo_set_mac_address = VNetNetifSetMAC,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- .ndo_set_multicast_list = VNetNetifSetMulticast,
-+#endif
- /*
- * We cannot stuck... If someone will report problems under
- * low memory conditions or some such, we should enable it.
-@@ -152,7 +156,9 @@ VNetNetIfSetup(struct net_device *dev) // IN:
- dev->stop = VNetNetifClose;
- dev->get_stats = VNetNetifGetStats;
- dev->set_mac_address = VNetNetifSetMAC;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- dev->set_multicast_list = VNetNetifSetMulticast;
-+#endif
- /*
- * We cannot stuck... If someone will report problems under
- * low memory conditions or some such, we should enable it.
-@@ -612,11 +618,12 @@ VNetNetifSetMAC(struct net_device *dev, // IN:
- *----------------------------------------------------------------------
- */
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
- void
- VNetNetifSetMulticast(struct net_device *dev) // IN: unused
- {
- }
--
-+#endif
-
- /*
- *----------------------------------------------------------------------
-diff --git a/vmnet-only/userif.c b/vmnet-only/userif.c
-index 541187b..77e0089 100644
---- a/vmnet-only/userif.c
-+++ b/vmnet-only/userif.c
-@@ -517,10 +517,18 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
- unsigned int tmpCsum;
- const void *vaddr;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+ vaddr = kmap(skb_frag_page(frag));
-+#else
- vaddr = kmap(frag->page);
-+#endif
- tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
- curr, frag->size, 0, &err);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
-+ kunmap(skb_frag_page(frag));
-+#else
- kunmap(frag->page);
-+#endif
- if (err) {
- return err;
- }
diff --git a/app-emulation/vmware-modules/files/264-apic.patch b/app-emulation/vmware-modules/files/264-apic.patch
deleted file mode 100644
index 66cd459..0000000
--- a/app-emulation/vmware-modules/files/264-apic.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index f1f4b10..c43242f 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -55,6 +55,7 @@
- #include <linux/kthread.h>
- #include <linux/wait.h>
-
-+#include <asm/apic.h>
-
- #include "vmware.h"
- #include "x86apic.h"
diff --git a/app-emulation/vmware-modules/files/264-d-make-root.patch b/app-emulation/vmware-modules/files/264-d-make-root.patch
deleted file mode 100644
index a02e4ce..0000000
--- a/app-emulation/vmware-modules/files/264-d-make-root.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/vmblock-only/linux/filesystem.c b/vmblock-only/linux/filesystem.c
-index b7c535e..a36a01e 100644
---- a/vmblock-only/linux/filesystem.c
-+++ b/vmblock-only/linux/filesystem.c
-@@ -525,7 +525,11 @@ FsOpReadSuper(struct super_block *sb, // OUT: Superblock object
- return -EINVAL;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
- rootDentry = d_alloc_root(rootInode);
-+#else
-+ rootDentry = d_make_root(rootInode);
-+#endif
- if (!rootDentry) {
- iput(rootInode);
- return -ENOMEM;
diff --git a/app-emulation/vmware-modules/files/264-jobserver.patch b/app-emulation/vmware-modules/files/264-jobserver.patch
deleted file mode 100644
index 59a6ccc..0000000
--- a/app-emulation/vmware-modules/files/264-jobserver.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -ru a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
---- a/work/vmblock-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmblock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmci-only/Makefile b/work/vmci-only/Makefile
---- a/work/vmci-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmci-only/Makefile 2011-01-22 09:13:55.898936002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
---- a/work/vmmon-only/Makefile 2011-01-22 08:59:15.907152002 -0500
-+++ b/work/vmmon-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
---- a/work/vmnet-only/Makefile 2011-01-22 08:59:15.911150002 -0500
-+++ b/work/vmnet-only/Makefile 2011-01-22 09:13:55.898936002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
-diff -ru a/work/vsock-only/Makefile b/work/vsock-only/Makefile
---- a/work/vsock-only/Makefile 2011-01-22 08:59:15.911150002 -0500
-+++ b/work/vsock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
-@@ -123,9 +123,9 @@
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
-- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
- endif
-
diff --git a/app-emulation/vmware-modules/files/264-makefile-include.patch b/app-emulation/vmware-modules/files/264-makefile-include.patch
deleted file mode 100644
index 39c3000..0000000
--- a/app-emulation/vmware-modules/files/264-makefile-include.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
-index ab7a727..e3ec9d2 100644
---- a/vmblock-only/Makefile.kernel
-+++ b/vmblock-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE += -I$(SRCROOT)/include
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
-diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
-index ba343ee..861ea83 100644
---- a/vmci-only/Makefile.kernel
-+++ b/vmci-only/Makefile.kernel
-@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
-
- INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- obj-m += $(DRIVER).o
-
-diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
-index 8770d1d..c4746c3 100644
---- a/vmmon-only/Makefile.kernel
-+++ b/vmmon-only/Makefile.kernel
-@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
- INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
- -I$(SRCROOT)/vmcore
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
-
-diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
-index d1e3133..665d428 100644
---- a/vmnet-only/Makefile.kernel
-+++ b/vmnet-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE := -I$(SRCROOT)
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
-diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
-index b4629ee..264b8cb 100644
---- a/vsock-only/Makefile.kernel
-+++ b/vsock-only/Makefile.kernel
-@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
- INCLUDE += -I$(SRCROOT)/linux
- INCLUDE += -I$(SRCROOT)/common
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )
-
-
diff --git a/app-emulation/vmware-modules/files/264-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/264-makefile-kernel-dir.patch
deleted file mode 100644
index d4bd6d1..0000000
--- a/app-emulation/vmware-modules/files/264-makefile-kernel-dir.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
-index 0bd0e74..27c3ede 100644
---- a/work/vmblock-only/Makefile
-+++ b/work/vmblock-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmblock
- PRODUCT := tools
-diff --git a/work/vmci-only/Makefile b/work/vmci-only/Makefile
-index 7babb8a..fbc5878 100644
---- a/work/vmci-only/Makefile
-+++ b/work/vmci-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmci
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
-index 4b4eb3e..1bb35ef 100644
---- a/work/vmmon-only/Makefile
-+++ b/work/vmmon-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmmon
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
-index 06856e7..fd53bf8 100644
---- a/work/vmnet-only/Makefile
-+++ b/work/vmnet-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmnet
- PRODUCT := @@PRODUCT@@
-diff --git a/work/vsock-only/Makefile b/work/vsock-only/Makefile
-index e02adb0..210e502 100644
---- a/work/vsock-only/Makefile
-+++ b/work/vsock-only/Makefile
-@@ -46,9 +46,9 @@ endif
- VM_UNAME = $(shell uname -r)
-
- # Header directory for the running kernel
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vsock
- PRODUCT := ws
diff --git a/app-emulation/vmware-modules/files/264-netdevice.patch b/app-emulation/vmware-modules/files/264-netdevice.patch
deleted file mode 100644
index 35231a3..0000000
--- a/app-emulation/vmware-modules/files/264-netdevice.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
-index 7a56304..9ff4548 100644
---- a/vmnet-only/compat_netdevice.h
-+++ b/vmnet-only/compat_netdevice.h
-@@ -47,6 +47,19 @@
- # define net_device device
- #endif
-
-+/* it looks like these have been removed from the kernel 3.1
-+ * probably because the "transition" is considered complete.
-+ * so to keep this source compatible we just redefine them like they were
-+ * previously
-+ */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
-+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
-+ functions are available. */
-+#define HAVE_FREE_NETDEV /* free_netdev() */
-+#define HAVE_NETDEV_PRIV /* netdev_priv() */
-+#define HAVE_NETIF_QUEUE
-+#define HAVE_NET_DEVICE_OPS
-+#endif
-
- /*
- * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
diff --git a/app-emulation/vmware-modules/files/264-putname.patch b/app-emulation/vmware-modules/files/264-putname.patch
deleted file mode 100644
index 6e76130..0000000
--- a/app-emulation/vmware-modules/files/264-putname.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
-index 79716bd..2dd83fe 100644
---- a/vmblock-only/linux/control.c
-+++ b/vmblock-only/linux/control.c
-@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
-
- retval = i < 0 ? -EINVAL : blockOp(name, blocker);
-
-- putname(name);
-+ __putname(name);
-
- return retval;
- }
diff --git a/app-emulation/vmware-modules/files/271-apic.patch b/app-emulation/vmware-modules/files/271-apic.patch
deleted file mode 100644
index 66cd459..0000000
--- a/app-emulation/vmware-modules/files/271-apic.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index f1f4b10..c43242f 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -55,6 +55,7 @@
- #include <linux/kthread.h>
- #include <linux/wait.h>
-
-+#include <asm/apic.h>
-
- #include "vmware.h"
- #include "x86apic.h"
diff --git a/app-emulation/vmware-modules/files/271-makefile-include.patch b/app-emulation/vmware-modules/files/271-makefile-include.patch
deleted file mode 100644
index 39c3000..0000000
--- a/app-emulation/vmware-modules/files/271-makefile-include.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
-index ab7a727..e3ec9d2 100644
---- a/vmblock-only/Makefile.kernel
-+++ b/vmblock-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE += -I$(SRCROOT)/include
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
-diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
-index ba343ee..861ea83 100644
---- a/vmci-only/Makefile.kernel
-+++ b/vmci-only/Makefile.kernel
-@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
-
- INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- obj-m += $(DRIVER).o
-
-diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
-index 8770d1d..c4746c3 100644
---- a/vmmon-only/Makefile.kernel
-+++ b/vmmon-only/Makefile.kernel
-@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
- INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
- -I$(SRCROOT)/vmcore
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
-
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
-
-diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
-index d1e3133..665d428 100644
---- a/vmnet-only/Makefile.kernel
-+++ b/vmnet-only/Makefile.kernel
-@@ -19,7 +19,7 @@
-
- INCLUDE := -I$(SRCROOT)
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
- EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
-diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
-index b4629ee..264b8cb 100644
---- a/vsock-only/Makefile.kernel
-+++ b/vsock-only/Makefile.kernel
-@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
- INCLUDE += -I$(SRCROOT)/linux
- INCLUDE += -I$(SRCROOT)/common
-
--EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
-+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )
-
-
diff --git a/app-emulation/vmware-modules/files/271-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/271-makefile-kernel-dir.patch
deleted file mode 100644
index 1a647a3..0000000
--- a/app-emulation/vmware-modules/files/271-makefile-kernel-dir.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
-index 2b81323..746c8b8 100644
---- a/vmblock-only/Makefile
-+++ b/vmblock-only/Makefile
-@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
- ifdef LINUXINCLUDE
- HEADER_DIR = $(LINUXINCLUDE)
- else
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
- endif
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmblock
- PRODUCT := ws
-diff --git a/vmci-only/Makefile b/vmci-only/Makefile
-index 8e9c5be..6ec828b 100644
---- a/vmci-only/Makefile
-+++ b/vmci-only/Makefile
-@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
- ifdef LINUXINCLUDE
- HEADER_DIR = $(LINUXINCLUDE)
- else
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
- endif
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmci
- PRODUCT := ws
-diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
-index 5bd867b..91a83d4 100644
---- a/vmmon-only/Makefile
-+++ b/vmmon-only/Makefile
-@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
- ifdef LINUXINCLUDE
- HEADER_DIR = $(LINUXINCLUDE)
- else
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
- endif
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmmon
- PRODUCT := @@PRODUCT@@
-diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
-index d4eb73c..c7c6d38 100644
---- a/vmnet-only/Makefile
-+++ b/vmnet-only/Makefile
-@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
- ifdef LINUXINCLUDE
- HEADER_DIR = $(LINUXINCLUDE)
- else
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
- endif
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vmnet
- PRODUCT := @@PRODUCT@@
-diff --git a/vsock-only/Makefile b/vsock-only/Makefile
-index 93dd61d..9765696 100644
---- a/vsock-only/Makefile
-+++ b/vsock-only/Makefile
-@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
- ifdef LINUXINCLUDE
- HEADER_DIR = $(LINUXINCLUDE)
- else
--HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
-+HEADER_DIR = $(KERNEL_DIR)
- endif
-
--BUILD_DIR = $(HEADER_DIR)/..
-+BUILD_DIR = $(KBUILD_OUTPUT)
-
- DRIVER := vsock
- PRODUCT := ws
diff --git a/app-emulation/vmware-modules/files/271-netdevice.patch b/app-emulation/vmware-modules/files/271-netdevice.patch
deleted file mode 100644
index 35231a3..0000000
--- a/app-emulation/vmware-modules/files/271-netdevice.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
-index 7a56304..9ff4548 100644
---- a/vmnet-only/compat_netdevice.h
-+++ b/vmnet-only/compat_netdevice.h
-@@ -47,6 +47,19 @@
- # define net_device device
- #endif
-
-+/* it looks like these have been removed from the kernel 3.1
-+ * probably because the "transition" is considered complete.
-+ * so to keep this source compatible we just redefine them like they were
-+ * previously
-+ */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
-+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
-+ functions are available. */
-+#define HAVE_FREE_NETDEV /* free_netdev() */
-+#define HAVE_NETDEV_PRIV /* netdev_priv() */
-+#define HAVE_NETIF_QUEUE
-+#define HAVE_NET_DEVICE_OPS
-+#endif
-
- /*
- * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
diff --git a/app-emulation/vmware-modules/files/271-putname.patch b/app-emulation/vmware-modules/files/271-putname.patch
deleted file mode 100644
index 6e76130..0000000
--- a/app-emulation/vmware-modules/files/271-putname.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
-index 79716bd..2dd83fe 100644
---- a/vmblock-only/linux/control.c
-+++ b/vmblock-only/linux/control.c
-@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
-
- retval = i < 0 ? -EINVAL : blockOp(name, blocker);
-
-- putname(name);
-+ __putname(name);
-
- return retval;
- }
diff --git a/app-emulation/vmware-modules/files/271-vmmon.patch b/app-emulation/vmware-modules/files/271-vmmon.patch
deleted file mode 100644
index f197964..0000000
--- a/app-emulation/vmware-modules/files/271-vmmon.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -ru source900/vmmon-only/linux/hostif.c source/vmmon-only/linux/hostif.c
---- source900/vmmon-only/linux/hostif.c 2012-07-23 18:18:55.000000000 +0900
-+++ source/vmmon-only/linux/hostif.c 2012-08-03 16:20:23.200420885 +0900
-@@ -48,6 +48,7 @@
- #include <linux/smp_lock.h>
- #endif
-
-+#include <asm/asm.h>
- #include <asm/io.h>
- #include <asm/uaccess.h>
- #include <linux/mc146818rtc.h>
-@@ -3586,31 +3587,14 @@
- {
- int ret;
- unsigned low, high;
--#if defined(VM_X86_64)
- asm volatile("2: rdmsr ; xor %0,%0\n"
- "1:\n\t"
- ".section .fixup,\"ax\"\n\t"
- "3: mov %4,%0 ; jmp 1b\n\t"
- ".previous\n\t"
-- ".section __ex_table,\"a\"\n\t"
-- ".balign 8\n"
-- ".quad 2b,3b\n"
-- ".previous\n"
-+ _ASM_EXTABLE(2b,3b)
- : "=r"(ret), "=a"(low), "=d"(high)
- : "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
--#else
-- asm volatile("2: rdmsr ; xor %0,%0\n"
-- "1:\n\t"
-- ".section .fixup,\"ax\"\n\t"
-- "3: mov %4,%0 ; jmp 1b\n\t"
-- ".previous\n\t"
-- ".section __ex_table,\"a\"\n"
-- ".balign 4\n"
-- ".long 2b,3b\n"
-- ".previous\n"
-- : "=r"(ret), "=a"(low), "=d"(high)
-- : "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
--#endif // VM_X86_64
- *val = (low | ((u64)(high) << 32));
-
- return ret;
diff --git a/app-emulation/vmware-modules/files/hardened.patch b/app-emulation/vmware-modules/files/hardened.patch
deleted file mode 100644
index ea1b0f3..0000000
--- a/app-emulation/vmware-modules/files/hardened.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-diff --git a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
-index 921f25c..41a39e3 100644
---- a/vmci-only/linux/driver.c
-+++ b/vmci-only/linux/driver.c
-@@ -241,7 +241,24 @@ static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
- #define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
- #endif
-
--static struct file_operations vmuser_fops;
-+/*
-+ * Moved file operations initialize here because of incompatibilites
-+ * with Gentoo hardened profile/hardend Linux 3.
-+ */
-+static struct file_operations vmuser_fops = {
-+ .owner = THIS_MODULE,
-+ .poll = LinuxDriverPoll,
-+#ifdef HAVE_UNLOCKED_IOCTL
-+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
-+#else
-+ .ioctl = LinuxDriver_Ioctl,
-+#endif
-+#ifdef HAVE_COMPAT_IOCTL
-+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
-+#endif
-+ .open = LinuxDriver_Open,
-+ .release = LinuxDriver_Close
-+};
-
-
- /*
-@@ -378,26 +395,6 @@ vmci_host_init(void)
- return -ENOMEM;
- }
-
-- /*
-- * Initialize the file_operations structure. Because this code is always
-- * compiled as a module, this is fine to do it here and not in a static
-- * initializer.
-- */
--
-- memset(&vmuser_fops, 0, sizeof vmuser_fops);
-- vmuser_fops.owner = THIS_MODULE;
-- vmuser_fops.poll = LinuxDriverPoll;
--#ifdef HAVE_UNLOCKED_IOCTL
-- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
--#else
-- vmuser_fops.ioctl = LinuxDriver_Ioctl;
--#endif
--#ifdef HAVE_COMPAT_IOCTL
-- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
--#endif
-- vmuser_fops.open = LinuxDriver_Open;
-- vmuser_fops.release = LinuxDriver_Close;
--
- sprintf(linuxState.deviceName, "vmci");
- linuxState.major = 10;
- linuxState.misc.minor = MISC_DYNAMIC_MINOR;
-diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
-index b21dd44..960c2aa 100644
---- a/vmmon-only/linux/driver.c
-+++ b/vmmon-only/linux/driver.c
-@@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = {
- #endif
- };
-
--static struct file_operations vmuser_fops;
-+static struct file_operations vmuser_fops = {
-+ .owner = THIS_MODULE,
-+ .poll = LinuxDriverPoll,
-+#ifdef HAVE_UNLOCKED_IOCTL
-+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
-+#else
-+ .ioctl = LinuxDriver_Ioctl,
-+#endif
-+#ifdef HAVE_COMPAT_IOCTL
-+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
-+#endif
-+ .open = LinuxDriver_Open,
-+ .release = LinuxDriver_Close,
-+ .mmap = LinuxDriverMmap
-+};
-+
- static struct timer_list tscTimer;
-
- /*
-@@ -357,27 +372,6 @@ init_module(void)
- spin_lock_init(&linuxState.pollListLock);
- #endif
-
-- /*
-- * Initialize the file_operations structure. Because this code is always
-- * compiled as a module, this is fine to do it here and not in a static
-- * initializer.
-- */
--
-- memset(&vmuser_fops, 0, sizeof vmuser_fops);
-- vmuser_fops.owner = THIS_MODULE;
-- vmuser_fops.poll = LinuxDriverPoll;
--#ifdef HAVE_UNLOCKED_IOCTL
-- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
--#else
-- vmuser_fops.ioctl = LinuxDriver_Ioctl;
--#endif
--#ifdef HAVE_COMPAT_IOCTL
-- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
--#endif
-- vmuser_fops.open = LinuxDriver_Open;
-- vmuser_fops.release = LinuxDriver_Close;
-- vmuser_fops.mmap = LinuxDriverMmap;
--
- #ifdef VMX86_DEVEL
- devel_init_module();
- linuxState.minor = 0;
-diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
-index b12b982..40bd4cf 100644
---- a/vmnet-only/driver.c
-+++ b/vmnet-only/driver.c
-@@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
- unsigned int iocmd, unsigned long ioarg);
- #endif
-
--static struct file_operations vnetFileOps;
-+static struct file_operations vnetFileOps = {
-+ .owner = THIS_MODULE,
-+ .read = VNetFileOpRead,
-+ .write = VNetFileOpWrite,
-+ .poll = VNetFileOpPoll,
-+#ifdef HAVE_UNLOCKED_IOCTL
-+ .unlocked_ioctl = VNetFileOpUnlockedIoctl,
-+#else
-+ .ioctl = VNetFileOpIoctl,
-+#endif
-+#ifdef HAVE_COMPAT_IOCTL
-+ .compat_ioctl = VNetFileOpUnlockedIoctl,
-+#endif
-+ .open = VNetFileOpOpen,
-+ .release = VNetFileOpClose
-+};
-
- /*
- * Utility functions
-@@ -476,28 +491,6 @@ init_module(void)
- goto err_proto;
- }
-
-- /*
-- * Initialize the file_operations structure. Because this code is always
-- * compiled as a module, this is fine to do it here and not in a static
-- * initializer.
-- */
--
-- memset(&vnetFileOps, 0, sizeof vnetFileOps);
-- vnetFileOps.owner = THIS_MODULE;
-- vnetFileOps.read = VNetFileOpRead;
-- vnetFileOps.write = VNetFileOpWrite;
-- vnetFileOps.poll = VNetFileOpPoll;
--#ifdef HAVE_UNLOCKED_IOCTL
-- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
--#else
-- vnetFileOps.ioctl = VNetFileOpIoctl;
--#endif
--#ifdef HAVE_COMPAT_IOCTL
-- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
--#endif
-- vnetFileOps.open = VNetFileOpOpen;
-- vnetFileOps.release = VNetFileOpClose;
--
- retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
- if (retval) {
- LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
diff --git a/app-emulation/vmware-modules/files/iommu_map.patch b/app-emulation/vmware-modules/files/iommu_map.patch
deleted file mode 100644
index bf714b0..0000000
--- a/app-emulation/vmware-modules/files/iommu_map.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -ru8 original//vmmon-only/linux/iommu.c patched//vmmon-only/linux/iommu.c
---- original//vmmon-only/linux/iommu.c 2010-05-21 02:45:24.000000000 -0400
-+++ patched//vmmon-only/linux/iommu.c 2010-06-16 10:39:09.000000000 -0400
-@@ -148,17 +148,17 @@
- printk(KERN_ERR "%s: the physical page number 0x%x is not valid.\n",
- __func__, mpn);
- status = -EINVAL;
- goto out;
- }
- map_to = PPN_2_PA(mpn);
- map_prot = IOMMU_READ | IOMMU_WRITE;
- }
-- if ((status = iommu_map_range(vmLinux->iommuDomain,
-+ if ((status = iommu_map(vmLinux->iommuDomain,
- PPN_2_PA(ppn),
- map_to, PAGE_SIZE, map_prot))) {
- printk(KERN_ERR "%s: IOMMU Mapping of PPN 0x%x -> MPN 0x%x "
- "could not be established.\n", __func__, ppn, mpn);
- goto out;
- }
- }
- printk(KERN_DEBUG "%s: IOMMU domain is created.\n", __func__);
-@@ -395,17 +395,17 @@
- list_del(&passthruDevice->list);
- IOMMUUnregisterDeviceInt(passthruDevice);
- }
- }
- spin_unlock(&passthruDeviceListLock);
-
- /* Relinquish the IOMMU domain used by this VM. */
- for (ppn = 0; ppn < vmLinux->numPages; ppn++) {
-- iommu_unmap_range(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
-+ iommu_unmap(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
- }
- if (vmLinux->iommuDomain) {
- iommu_domain_free(vmLinux->iommuDomain);
- vmLinux->iommuDomain = NULL;
- printk(KERN_INFO "%s: IOMMU domain is destroyed.\n", __func__);
- }
- }
-
diff --git a/app-emulation/vmware-modules/files/sk_sleep.patch b/app-emulation/vmware-modules/files/sk_sleep.patch
deleted file mode 100644
index 583b6c8..0000000
--- a/app-emulation/vmware-modules/files/sk_sleep.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff -ru8 original//vsock-only/linux/af_vsock.c patched//vsock-only/linux/af_vsock.c
---- original//vsock-only/linux/af_vsock.c 2010-05-21 00:17:27.000000000 -0400
-+++ patched//vsock-only/linux/af_vsock.c 2010-06-15 23:48:52.000000000 -0400
-@@ -3216,17 +3216,17 @@
- }
-
- /*
- * The receive path will handle all communication until we are able to enter
- * the connected state. Here we wait for the connection to be completed or
- * a notification of an error.
- */
- timeout = sock_sndtimeo(sk, flags & O_NONBLOCK);
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while (sk->compat_sk_state != SS_CONNECTED && sk->compat_sk_err == 0) {
- if (timeout == 0) {
- /*
- * If we're not going to block, skip ahead to preserve error code set
- * above.
- */
- goto outWait;
-@@ -3239,29 +3239,29 @@
- if (signal_pending(current)) {
- err = sock_intr_errno(timeout);
- goto outWaitError;
- } else if (timeout == 0) {
- err = -ETIMEDOUT;
- goto outWaitError;
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
- }
-
- if (sk->compat_sk_err) {
- err = -sk->compat_sk_err;
- goto outWaitError;
- } else {
- ASSERT(sk->compat_sk_state == SS_CONNECTED);
- err = 0;
- }
-
- outWait:
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
- return err;
-
- outWaitError:
- sk->compat_sk_state = SS_UNCONNECTED;
- sock->state = SS_UNCONNECTED;
- goto outWait;
-@@ -3311,33 +3311,33 @@
- goto out;
- }
-
- /*
- * Wait for children sockets to appear; these are the new sockets created
- * upon connection establishment.
- */
- timeout = sock_sndtimeo(listener, flags & O_NONBLOCK);
-- compat_init_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE);
-
- while ((connected = VSockVmciDequeueAccept(listener)) == NULL &&
- listener->compat_sk_err == 0) {
- release_sock(listener);
- timeout = schedule_timeout(timeout);
- lock_sock(listener);
-
- if (signal_pending(current)) {
- err = sock_intr_errno(timeout);
- goto outWait;
- } else if (timeout == 0) {
- err = -EAGAIN;
- goto outWait;
- }
-
-- compat_cont_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_cont_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE);
- }
-
- if (listener->compat_sk_err) {
- err = -listener->compat_sk_err;
- }
-
- if (connected) {
- listener->compat_sk_ack_backlog--;
-@@ -3361,17 +3361,17 @@
-
- newsock->state = SS_CONNECTED;
- sock_graft(connected, newsock);
- release_sock(connected);
- sock_put(connected);
- }
-
- outWait:
-- compat_finish_wait(listener->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(listener), &wait, TASK_RUNNING);
- out:
- release_sock(listener);
- return err;
- }
-
-
- /*
- *----------------------------------------------------------------------------
-@@ -3459,17 +3459,17 @@
- {
- struct sock *sk;
- unsigned int mask;
- VSockVmciSock *vsk;
-
- sk = sock->sk;
- vsk = vsock_sk(sk);
-
-- poll_wait(file, sk->compat_sk_sleep, wait);
-+ poll_wait(file, compat_sk_sleep(sk), wait);
- mask = 0;
-
- if (sk->compat_sk_err) {
- /* Signify that there has been an error on this socket. */
- mask |= POLLERR;
- }
-
- /*
-@@ -4099,17 +4099,17 @@
- */
- timeout = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
-
- NOTIFYCALLRET(vsk, err, sendInit, sk, &sendData);
- if (err < 0) {
- goto out;
- }
-
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while (totalWritten < len) {
- Bool sentWrote;
- unsigned int retries;
- ssize_t written;
-
- sentWrote = FALSE;
- retries = 0;
-@@ -4136,17 +4136,17 @@
- if (signal_pending(current)) {
- err = sock_intr_errno(timeout);
- goto outWait;
- } else if (timeout == 0) {
- err = -EAGAIN;
- goto outWait;
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep,
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk),
- &wait, TASK_INTERRUPTIBLE);
- }
-
- /*
- * These checks occur both as part of and after the loop conditional
- * since we need to check before and after sleeping.
- */
- if (sk->compat_sk_err) {
-@@ -4189,17 +4189,17 @@
- }
-
- ASSERT(totalWritten <= INT_MAX);
-
- outWait:
- if (totalWritten > 0) {
- err = totalWritten;
- }
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
- return err;
- }
-
-
- /*
- *----------------------------------------------------------------------------
-@@ -4423,17 +4423,17 @@
- timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
- copied = 0;
-
- NOTIFYCALLRET(vsk, err, recvInit, sk, target, &recvData);
- if (err < 0) {
- goto out;
- }
-
-- compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
-
- while ((ready = VSockVmciStreamHasData(vsk)) < target &&
- sk->compat_sk_err == 0 &&
- !(sk->compat_sk_shutdown & RCV_SHUTDOWN) &&
- !(vsk->peerShutdown & SEND_SHUTDOWN)) {
-
- if (ready < 0) {
- /*
-@@ -4463,17 +4463,17 @@
- if (signal_pending(current)) {
- err = sock_intr_errno(timeout);
- goto outWait;
- } else if (timeout == 0) {
- err = -EAGAIN;
- goto outWait;
- }
-
-- compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
-+ compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
- }
-
- if (sk->compat_sk_err) {
- err = -sk->compat_sk_err;
- goto outWait;
- } else if (sk->compat_sk_shutdown & RCV_SHUTDOWN) {
- err = 0;
- goto outWait;
-@@ -4529,17 +4529,17 @@
- if (err < 0) {
- goto outWait;
- }
-
- ASSERT(copied <= INT_MAX);
- err = copied;
-
- outWait:
-- compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
-+ compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
- out:
- release_sock(sk);
- return err;
- }
-
-
- /*
- * Protocol operation.
diff --git a/app-emulation/vmware-modules/metadata.xml b/app-emulation/vmware-modules/metadata.xml
deleted file mode 100644
index e579266..0000000
--- a/app-emulation/vmware-modules/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<herd>vmware</herd>
- <use>
- <flag name="pax_kernel"></flag>
- </use>
-</pkgmetadata>
diff --git a/app-emulation/vmware-modules/vmware-modules-238.6.ebuild b/app-emulation/vmware-modules/vmware-modules-238.6.ebuild
deleted file mode 100644
index 447af26..0000000
--- a/app-emulation/vmware-modules/vmware-modules-238.6.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-238.6.ebuild,v 1.2 2012/12/12 11:46:57 ssuominen Exp $
-
-EAPI="4"
-
-inherit eutils flag-o-matic linux-info linux-mod user versionator udev
-
-PV_MAJOR=$(get_major_version)
-PV_MINOR=$(get_version_component_range 2)
-
-DESCRIPTION="VMware kernel modules"
-HOMEPAGE="http://www.vmware.com/"
-
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- || ( =app-emulation/vmware-player-3.1.${PV_MINOR}*
- =app-emulation/vmware-workstation-7.1.${PV_MINOR}* )"
-
-S=${WORKDIR}
-
-pkg_setup() {
- CONFIG_CHECK="~HIGH_RES_TIMERS"
- if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
- CONFIG_CHECK="${CONFIG_CHECK} BKL"
- fi
-
- linux-info_pkg_setup
-
- linux-mod_pkg_setup
-
- VMWARE_GROUP=${VMWARE_GROUP:-vmware}
-
- VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
- VMWARE_MOD_DIR="${PN}-${PVR}"
-
- BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
-
- enewgroup "${VMWARE_GROUP}"
- filter-flags -mfpmath=sse
-
- for mod in ${VMWARE_MODULE_LIST}; do
- MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
- done
-}
-
-src_unpack() {
- cd "${S}"
- for mod in ${VMWARE_MODULE_LIST}; do
- tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
- done
-}
-
-src_prepare() {
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
- kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch"
- kernel_is ge 2 6 39 && epatch "${FILESDIR}/${PV_MAJOR}-2.6.39.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-3.2.0.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-d-make-root.patch"
-
- # Allow user patches so they can support RC kernels and whatever else
- epatch_user
-}
-
-src_install() {
- linux-mod_src_install
- local udevrules="${T}/60-vmware.rules"
- cat > "${udevrules}" <<-EOF
- KERNEL=="vmci", GROUP="vmware", MODE=660
- KERNEL=="vmmon", GROUP="vmware", MODE=660
- KERNEL=="vsock", GROUP="vmware", MODE=660
- EOF
- udev_dorules "${udevrules}"
-}
diff --git a/app-emulation/vmware-modules/vmware-modules-264.5.ebuild b/app-emulation/vmware-modules/vmware-modules-264.5.ebuild
deleted file mode 100644
index 9635470..0000000
--- a/app-emulation/vmware-modules/vmware-modules-264.5.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="4"
-
-inherit eutils flag-o-matic linux-info linux-mod user versionator udev
-
-PV_MAJOR=$(get_major_version)
-PV_MINOR=$(get_version_component_range 2)
-
-DESCRIPTION="VMware kernel modules"
-HOMEPAGE="http://www.vmware.com/"
-
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="pax_kernel"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- || ( =app-emulation/vmware-player-4.0.${PV_MINOR}*
- =app-emulation/vmware-workstation-8.0.${PV_MINOR}* )"
-
-S=${WORKDIR}
-
-pkg_setup() {
- CONFIG_CHECK="~HIGH_RES_TIMERS"
- if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
- CONFIG_CHECK="${CONFIG_CHECK} BKL"
- fi
-
- linux-info_pkg_setup
-
- linux-mod_pkg_setup
-
- VMWARE_GROUP=${VMWARE_GROUP:-vmware}
-
- VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
- VMWARE_MOD_DIR="${PN}-${PVR}"
-
- BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
-
- enewgroup "${VMWARE_GROUP}"
- filter-flags -mfpmath=sse
-
- for mod in ${VMWARE_MODULE_LIST}; do
- MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
- done
-}
-
-src_unpack() {
- cd "${S}"
- for mod in ${VMWARE_MODULE_LIST}; do
- tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
- done
-}
-
-src_prepare() {
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
- use pax_kernel && epatch "${FILESDIR}/hardened.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
- kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
-
- # Allow user patches so they can support RC kernels and whatever else
- epatch_user
-}
-
-src_install() {
- linux-mod_src_install
- local udevrules="${T}/60-vmware.rules"
- cat > "${udevrules}" <<-EOF
- KERNEL=="vmci", GROUP="vmware", MODE=660
- KERNEL=="vmmon", GROUP="vmware", MODE=660
- KERNEL=="vsock", GROUP="vmware", MODE=660
- EOF
- udev_dorules "${udevrules}"
-}
diff --git a/app-emulation/vmware-modules/vmware-modules-271.2.ebuild b/app-emulation/vmware-modules/vmware-modules-271.2.ebuild
deleted file mode 100644
index d874dca..0000000
--- a/app-emulation/vmware-modules/vmware-modules-271.2.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-264.4.ebuild,v 1.1 2012/06/17 13:09:10 vadimk Exp $
-
-EAPI="4"
-
-inherit eutils flag-o-matic linux-info linux-mod user versionator udev
-
-PV_MAJOR=$(get_major_version)
-PV_MINOR=$(get_version_component_range 2)
-
-DESCRIPTION="VMware kernel modules"
-HOMEPAGE="http://www.vmware.com/"
-
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="pax_kernel"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- || ( =app-emulation/vmware-player-5.0.${PV_MINOR}*
- =app-emulation/vmware-workstation-9.0.${PV_MINOR}* )"
-
-S=${WORKDIR}
-
-pkg_setup() {
- CONFIG_CHECK="~HIGH_RES_TIMERS"
- if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
- CONFIG_CHECK="${CONFIG_CHECK} BKL"
- fi
-
- linux-info_pkg_setup
-
- linux-mod_pkg_setup
-
- VMWARE_GROUP=${VMWARE_GROUP:-vmware}
-
- VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
- VMWARE_MOD_DIR="${PN}-${PVR}"
-
- BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
-
- enewgroup "${VMWARE_GROUP}"
- filter-flags -mfpmath=sse
-
- for mod in ${VMWARE_MODULE_LIST}; do
- MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
- done
-}
-
-src_unpack() {
- cd "${S}"
- for mod in ${VMWARE_MODULE_LIST}; do
- tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
- done
-}
-
-src_prepare() {
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
- use pax_kernel && epatch "${FILESDIR}/hardened.patch"
- epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
- kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
-
- # Allow user patches so they can support RC kernels and whatever else
- epatch_user
-}
-
-src_install() {
- linux-mod_src_install
- local udevrules="${T}/60-vmware.rules"
- cat > "${udevrules}" <<-EOF
- KERNEL=="vmci", GROUP="vmware", MODE=660
- KERNEL=="vmmon", GROUP="vmware", MODE=660
- KERNEL=="vsock", GROUP="vmware", MODE=660
- EOF
- udev_dorules "${udevrules}"
-}