#include <windows.h>
#include <stdio.h>
int main()
{
if(IsProcessorFeaturePresent(PF_VIRT_FIRMWARE_ENABLED))
{
printf("Virtualization is present.\n");
}
else
{
printf("Virtualization not present.\n");
}
return 0;
#include <stdio.h>
int main()
{
if(IsProcessorFeaturePresent(PF_VIRT_FIRMWARE_ENABLED))
{
printf("Virtualization is present.\n");
}
else
{
printf("Virtualization not present.\n");
}
return 0;
}
According to https://technet.microsoft.com/en-US/library/ms724482
The document introduces PF_VIRT_FIRMWARE_ENABLED to indicate that Virtualization is enabled in the firmware. However, this macro cannot be seen in VS2008. The official Windows document indicates that the value is 21.