summarylogtreecommitdiffstats
path: root/vmnet-15.5.1-5.3.patch
blob: a0b1491ac5ca4352ab064ba7fd5f686097e971a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff --git vmnet-only/Makefile vmnet-only/Makefile
index 40bdb6a..5ac1180 100644
--- vmnet-only/Makefile
+++ vmnet-only/Makefile
@@ -136,9 +136,6 @@ ifdef VMX86_DEBUG
 CC_OPTS += -DVMX86_DEBUG
 endif
 
-# Add Spectre options when available
-CC_OPTS += $(call vm_check_gcc,-mindirect-branch=thunk -mindirect-branch-register,)
-
 include $(SRCROOT)/Makefile.kernel
 
 else
diff --git vmnet-only/Makefile.kernel vmnet-only/Makefile.kernel
index 44a8a95..de04abe 100644
--- vmnet-only/Makefile.kernel
+++ vmnet-only/Makefile.kernel
@@ -32,6 +32,6 @@ $(DRIVER)-y := driver.o hub.o userif.o netif.o bridge.o procfs.o smac_compat.o \
 ####
 
 clean:
-	rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko \
+	rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko .cache.mk \
 	       .tmp_versions Module.symvers Modules.symvers Module.markers \
 	       modules.order $($(DRIVER)-y) .*.cmd .*.o.flags
diff --git vmnet-only/bridge.c vmnet-only/bridge.c
index 25a7442..fd692d2 100644
--- vmnet-only/bridge.c
+++ vmnet-only/bridge.c
@@ -67,6 +67,18 @@
 
 #if LOGLEVEL >= 4
 static struct timeval vnetTime;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+static void do_gettimeofday(struct timeval *tv)
+{
+	struct timespec64 now;
+
+	ktime_get_real_ts64(&now);
+	tv->tv_sec = now.tv_sec;
+	tv->tv_usec = now.tv_nsec / 1000;
+}
+#endif
+
 #endif
 
 typedef struct VNetBridge VNetBridge;
diff --git vmnet-only/vm_device_version.h vmnet-only/vm_device_version.h
index 440038d..8758f87 100644
--- vmnet-only/vm_device_version.h
+++ vmnet-only/vm_device_version.h
@@ -35,6 +35,8 @@
 #endif
 #endif
 
+#include <linux/pci_ids.h>
+
 /* LSILogic 53C1030 Parallel SCSI controller
  * LSILogic SAS1068 SAS controller
  */
@@ -53,7 +55,10 @@
  *    VMware HD Audio codec
  *    VMware HD Audio controller
  */
+#ifndef PCI_VENDOR_ID_VMWARE
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
+#endif
+
 #define PCI_DEVICE_ID_VMWARE_SVGA3              0x0406
 #define PCI_DEVICE_ID_VMWARE_SVGA2              0x0405
 #define PCI_DEVICE_ID_VMWARE_SVGA               0x0710
@@ -71,7 +76,11 @@
 #define PCI_DEVICE_ID_VMWARE_1394               0x0780
 #define PCI_DEVICE_ID_VMWARE_BRIDGE             0x0790
 #define PCI_DEVICE_ID_VMWARE_ROOTPORT           0x07A0
+
+#ifndef PCI_DEVICE_ID_VMWARE_VMXNET3
 #define PCI_DEVICE_ID_VMWARE_VMXNET3            0x07B0
+#endif
+
 #define PCI_DEVICE_ID_VMWARE_PVSCSI             0x07C0
 #define PCI_DEVICE_ID_VMWARE_82574              0x07D0
 #define PCI_DEVICE_ID_VMWARE_AHCI               0x07E0