mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-05 19:11:57 +02:00
vmware-modules: added patch to hopefully fix #162, not keyworded as it was only compile tested
This commit is contained in:
parent
1986a88d5a
commit
0b61fb58d8
3 changed files with 361 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
AUX 1.0.0.26-makefile-include.patch 2873 RMD160 2313761dc064d066ab912af294fc95bb462ff05e SHA1 2deae503f8c169c23b228981593996b03367b609 SHA256 d870c2f507c430adce76c251fa1c107cce512b38eaeacda9f1ffee485c02c02c
|
||||
AUX 1.0.0.26-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
|
||||
AUX vmware-2.6.35-compile.patch 8567 RMD160 c5cbf53d12e95d060e511384a6b86708f2408644 SHA1 f8e80c73728b6798918510b9c25dea1ad7bde5c4 SHA256 86b9fbafdc8937dbd3a01479e11dfda81648b5f74bf6f588fea393925381db80
|
||||
DIST vmware-modules-1.0.0.26.amd64.tar.bz2 630368 RMD160 d3321edf23598493a937d71c9d3200921b05a13e SHA1 eed55d8b267af74d05e1a3eab150fa35cbfdf1ba SHA256 8fd323c39c62bf4995ab34b7b544344ac79740d4bd647bf89cd7fb24a6cdf898
|
||||
DIST vmware-modules-1.0.0.26.x86.tar.bz2 630339 RMD160 c04ec66c0fda191337a35f9447776584ca34ffff SHA1 2329f085405a79121a973f125564ca9d99a3c9cb SHA256 08df4bfb19cda7ba5eb4cf11b7f8a88bd8750db712e45116eb0a0d9895644a82
|
||||
EBUILD vmware-modules-1.0.0.26-r1.ebuild 1950 RMD160 98454421859f41e109b9b7f936a824bb1a0294d4 SHA1 57661398a1295765979722abb8b368bb0068345c SHA256 0457964a149e847d84f820717d577073bf3efbc0a6c5a4008753eaa0cc4d94f2
|
||||
EBUILD vmware-modules-1.0.0.26.ebuild 1909 RMD160 94ee8109ff1b9b82181899707c012a2563b3128c SHA1 f55b8fd1eba2ac24ff38968d014607452ffe0b77 SHA256 4af1ff0bc768dd81b2776e1696fad59bcce49c66094a9c7f8010547bf5af8466
|
||||
|
|
|
|||
283
app-emulation/vmware-modules/files/vmware-2.6.35-compile.patch
Normal file
283
app-emulation/vmware-modules/files/vmware-2.6.35-compile.patch
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
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 -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.
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25.ebuild,v 1.5 2010/01/02 20:07:47 vadimk Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils flag-o-matic linux-mod
|
||||
|
||||
DESCRIPTION="VMware kernel modules"
|
||||
HOMEPAGE="http://www.vmware.com/"
|
||||
|
||||
SRC_URI="x86? (
|
||||
http://dev.pentoo.ch/~grimmlin/vmware/${P}.x86.tar.bz2
|
||||
mirror://gentoo/${P}.x86.tar.bz2
|
||||
http://dev.gentoo.org/~vadimk/${P}.x86.tar.bz2
|
||||
)
|
||||
amd64? (
|
||||
http://dev.pentoo.ch/~grimmlin/vmware/${P}.amd64.tar.bz2
|
||||
mirror://gentoo/${P}.amd64.tar.bz2
|
||||
http://dev.gentoo.org/~vadimk/${P}.amd64.tar.bz2
|
||||
)"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
|
||||
VMWARE_VER="VME_V70" # THIS VALUE IS JUST A PLACE HOLDER
|
||||
VMWARE_GROUP=${VMWARE_GROUP:-vmware}
|
||||
|
||||
VMWARE_MODULE_LIST="vmblock 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
|
||||
unpack ./"${P}"/${mod}.tar
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PV}-makefile-kernel-dir.patch"
|
||||
epatch "${FILESDIR}/${PV}-makefile-include.patch"
|
||||
epatch "${FILESDIR}"/vmware-2.6.35-compile.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# this adds udev rules for vmmon*
|
||||
if [[ -n "`echo ${VMWARE_MODULE_LIST} | grep vmmon`" ]];
|
||||
then
|
||||
dodir /etc/udev/rules.d
|
||||
echo 'KERNEL=="vmmon*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
|
||||
echo 'KERNEL=="vmnet*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
|
||||
fi
|
||||
|
||||
linux-mod_src_install
|
||||
}
|
||||
Loading…
Reference in a new issue