message: vpmu: early exit if vPMU is not enabled in hypervisor
diff: @@ -576,6 +576,21 @@ bool PCM::detectModel()
  };
  linux_arch_perfmon = checkLinuxCpuinfoFlag("arch_perfmon");
  std::cerr << "Linux arch_perfmon flag : " << (linux_arch_perfmon ? "yes" : "no") << "\n";
  + if (vm == true && linux_arch_perfmon == false)
  + {
  + std::cerr << "ERROR: vPMU is not enabled in the hypervisor. Please see details in https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/on-virtual-machine.html \n";
  + std::cerr << " you can force-continue by setting PCM_IGNORE_ARCH_PERFMON=1 environment variable.\n";
  + auto env = std::getenv("PCM_IGNORE_ARCH_PERFMON");
  + auto ignore_arch_perfmon = false;
  + if (env != nullptr && std::string(env) == std::string("1"))
  + {
  + ignore_arch_perfmon = true;
  + }
  + if (!ignore_arch_perfmon)
  + {
  + return false;
  + }
  + }
  #endif
  std::cerr << "IBRS and IBPB supported : " << ((cpuinfo.reg.edx & (1 << 26)) ? "yes" : "no") << "\n";
  