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 + /* 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