--- a/vmmon/Makefile +++ b/vmmon/Makefile @@ -43,7 +43,11 @@ INCLUDE += -I$(SRCROOT)/shared endif +ifdef KVERSION +VM_UNAME = $(KVERSION) +else VM_UNAME = $(shell uname -r) +endif # Header directory for the running kernel ifdef LINUXINCLUDE @@ -137,7 +137,7 @@ endif # Add Spectre options when available -CC_OPTS += $(call vm_check_gcc,-mindirect-branch=thunk -mindirect-branch-register,) +CC_OPTS += $(call vm_check_gcc,-mindirect-branch-register,) include $(SRCROOT)/Makefile.kernel --- a/vmmon/linux/driver.c +++ b/vmmon/linux/driver.c @@ -38,6 +38,8 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) #error Linux kernels before 2.6.32 are not supported +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) +#error Linux kernels from 5.8.0 are not supported #endif #include