Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -u -r source30//vmmon-only/linux/iommu.c source/vmmon-only/linux/iommu.c
- --- source30//vmmon-only/linux/iommu.c 2011-08-23 02:11:45.000000000 +0200
- +++ source/vmmon-only/linux/iommu.c 2011-11-09 15:19:36.000000000 +0100
- @@ -42,6 +42,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(2, 42, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || 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 {
- uint32 bdf;
- struct pci_dev *pdev;
- diff -u -r source30//vmnet-only/compat_netdevice.h source/vmnet-only/compat_netdevice.h
- --- source30//vmnet-only/compat_netdevice.h 2011-08-23 02:11:46.000000000 +0200
- +++ source/vmnet-only/compat_netdevice.h 2011-09-17 09:38:03.000000000 +0200
- @@ -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(2, 41, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || 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 -u -r source30//vmnet-only/filter.c source/vmnet-only/filter.c
- --- source30//vmnet-only/filter.c 2011-08-23 02:11:47.000000000 +0200
- +++ source/vmnet-only/filter.c 2011-11-09 15:57:12.000000000 +0100
- @@ -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 -u -r source30//vmnet-only/netif.c source/vmnet-only/netif.c
- --- source30//vmnet-only/netif.c 2011-08-23 02:11:47.000000000 +0200
- +++ source/vmnet-only/netif.c 2011-11-09 15:53:30.000000000 +0100
- @@ -62,7 +62,9 @@
- 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(2, 42, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || 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 @@
- .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.
- @@ -625,11 +629,12 @@
- *----------------------------------------------------------------------
- */
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 42, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
- void
- VNetNetifSetMulticast(struct net_device *dev) // IN: unused
- {
- }
- -
- +#endif
- /*
- *----------------------------------------------------------------------
- diff -u -r source30//vmnet-only/userif.c source/vmnet-only/userif.c
- --- source30//vmnet-only/userif.c 2011-08-23 02:11:46.000000000 +0200
- +++ source/vmnet-only/userif.c 2011-11-09 16:21:20.000000000 +0100
- @@ -517,10 +517,18 @@
- unsigned int tmpCsum;
- const void *vaddr;
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 42, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || 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(2, 42, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
- + kunmap(skb_frag_page(frag));
- +#else
- kunmap(frag->page);
- +#endif
- if (err) {
- return err;
- }
- diff -u -r source30//vmblock-only/linux/filesystem.c source/vmblock-only/linux/filesystem.c
- --- source30//vmblock-only/linux/filesystem.c 2011-08-23 02:11:46.000000000 +0200
- +++ source/vmblock-only/linux/filesystem.c 2012-08-14 19:05:34.000000000 -0500
- @@ -525,7 +525,7 @@
- return -EINVAL;
- }
- - rootDentry = d_alloc_root(rootInode);
- + rootDentry = d_make_root(rootInode);
- if (!rootDentry) {
- iput(rootInode);
- return -ENOMEM;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement