Exemple #1
0
/*
 * is_cpu_clflushopt_present -- checks if CLFLUSHOPT instruction is supported
 */
int
is_cpu_clflushopt_present(void)
{
	if (!is_cpu_genuine_intel())
		return 0;

	int ret = is_cpu_feature_present(0x7, EBX_IDX, bit_CLFLUSHOPT);
	LOG(4, "CLFLUSHOPT %ssupported", ret == 0 ? "not " : "");

	return ret;
}
Exemple #2
0
/*
 * is_cpu_clwb_present -- checks if CLWB instruction is supported
 */
int
is_cpu_clwb_present(void)
{
	if (!is_cpu_genuine_intel())
		return 0;

	int ret = is_cpu_feature_present(0x7, EBX_IDX, bit_CLWB);
	LOG(4, "CLWB %ssupported", ret == 0 ? "not " : "");

	return ret;
}
Exemple #3
0
/*
 * is_cpu_pcommit_present -- checks if PCOMMIT instruction is supported
 */
int is_cpu_pcommit_present(void) {
  unsigned cpuinfo[4] = {0};

  if (!is_cpu_genuine_intel()) return 0;

  cpuid(0x7, 0x0, cpuinfo);

  int ret = (cpuinfo[EBX_IDX] & bit_PCOMMIT) != 0;

  return ret;
}