summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2011-03-27 15:40:08 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2011-03-27 15:40:08 +0000
commit91af8cb195f3337845e2cfdbc7abaed192094b94 (patch)
tree72f42417ce1407a9b0af558a42e605ad2520cf40 /app-emulation/vmware-modules
parentRename USE="iphone" to USE="ios" wrt #344763. (diff)
downloadgentoo-2-91af8cb195f3337845e2cfdbc7abaed192094b94.tar.gz
gentoo-2-91af8cb195f3337845e2cfdbc7abaed192094b94.tar.bz2
gentoo-2-91af8cb195f3337845e2cfdbc7abaed192094b94.zip
vmware kernel modules for vmware server 2 host
(Portage version: 2.1.9.44/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/ChangeLog9
-rw-r--r--app-emulation/vmware-modules/files/208-sema.patch83
-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/vmware-modules-208.2.ebuild73
5 files changed, 271 insertions, 1 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog
index 33b49f53c2a1..a90aeb6609ac 100644
--- a/app-emulation/vmware-modules/ChangeLog
+++ b/app-emulation/vmware-modules/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-emulation/vmware-modules
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.73 2011/03/27 15:20:08 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.74 2011/03/27 15:40:08 vadimk Exp $
+
+*vmware-modules-208.2 (27 Mar 2011)
+
+ 27 Mar 2011; Vadim Kuznetsov <vadimk@gentoo.org> +files/208-sema.patch,
+ +files/208-sk_sleep.patch, +files/208-unlocked_ioctl.patch,
+ +vmware-modules-208.2.ebuild:
+ vmware kernel modules for vmware server 2 host
*vmware-modules-238.3-r8 (27 Mar 2011)
diff --git a/app-emulation/vmware-modules/files/208-sema.patch b/app-emulation/vmware-modules/files/208-sema.patch
new file mode 100644
index 000000000000..1ebdab7ee009
--- /dev/null
+++ b/app-emulation/vmware-modules/files/208-sema.patch
@@ -0,0 +1,83 @@
+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/208-sk_sleep.patch b/app-emulation/vmware-modules/files/208-sk_sleep.patch
new file mode 100644
index 000000000000..d92dd7c3c817
--- /dev/null
+++ b/app-emulation/vmware-modules/files/208-sk_sleep.patch
@@ -0,0 +1,74 @@
+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
new file mode 100644
index 000000000000..62ae5e86b86b
--- /dev/null
+++ b/app-emulation/vmware-modules/files/208-unlocked_ioctl.patch
@@ -0,0 +1,33 @@
+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/vmware-modules-208.2.ebuild b/app-emulation/vmware-modules/vmware-modules-208.2.ebuild
new file mode 100644
index 000000000000..6c0d6bcc0d57
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-208.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-208.2.ebuild,v 1.1 2011/03/27 15:40:08 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic linux-mod versionator
+
+PV_MAJOR=$(get_major_version)
+PV_MINOR=$(get_version_component_range 2)
+
+DESCRIPTION="VMware kernel modules"
+HOMEPAGE="http://www.vmware.com/"
+
+SRC_URI="mirror://gentoo/${P}.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ =app-emulation/vmware-server-2.0.${PV_MINOR}*"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ VMWARE_VER="VME_V65" # THIS VALUE IS JUST A PLACE HOLDER
+ VMWARE_GROUP=${VMWARE_GROUP:-vmware}
+
+ VMWARE_MODULE_LIST="vmci vmmon vmnet vsock"
+ VMWARE_MOD_DIR="${PN}-${PVR}"
+
+ BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} 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() {
+ unpack ${A}
+ cd "${S}"
+ for mod in ${VMWARE_MODULE_LIST}; do
+ tar -xf /opt/vmware/server/lib/modules/source/${mod}.tar
+ done
+
+}
+
+src_prepare() {
+ epatch "${S}/${P}.patch"
+ kernel_is ge 2 6 35 && epatch "${FILESDIR}/${PV_MAJOR}-sk_sleep.patch"
+ kernel_is ge 2 6 36 && epatch "${FILESDIR}/${PV_MAJOR}-unlocked_ioctl.patch"
+ kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch"
+}
+
+src_install() {
+ linux-mod_src_install
+ local udevrules="${T}/60-vmware.rules"
+ cat > "${udevrules}" <<-EOF
+ KERNEL=="vmci", GROUP="${VMWARE_GROUP}", MODE=660
+ KERNEL=="vmmon", GROUP="${VMWARE_GROUP}", MODE=660
+ KERNEL=="vsock", GROUP="${VMWARE_GROUP}", MODE=660
+ EOF
+ insinto /etc/udev/rules.d/
+ doins "${udevrules}"
+}