I have written a simple driver which is supposed to check if VMX is enabled or not, and the code for that is below.
#include <linux/module.h>
#include <linux/init.h>
inline bool vmxSupport(void)
{
int getVmxSupport, vmxBit;
__asm__ ("mov $1, %rax");
__asm__ ("cpuid");
__asm__ ("mov %