pentoo-overlay/app-emulation/vmware-modules/files/vmware-2.6.35-compile.patch

283 lines
8.4 KiB
Diff

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.