macro_rules! is_x86_feature_detected {
("tsc") => { ... };
("msr") => { ... };
("apic") => { ... };
("cx16") => { ... };
("pcid") => { ... };
("x2apic") => { ... };
("tsc_deadline") => { ... };
("xsave") => { ... };
("hypervisor") => { ... };
("arat") => { ... };
("intel_thread_director") => { ... };
("fsgsbase") => { ... };
("tsc_adjust") => { ... };
("smep") => { ... };
("invpcid") => { ... };
("smap") => { ... };
("la57") => { ... };
("rdpid") => { ... };
("hybrid") => { ... };
("lass") => { ... };
("nmi_src") => { ... };
("xsave_x87") => { ... };
("xsave_sse") => { ... };
("xsave_avx") => { ... };
("xsave_avx512_opmask") => { ... };
("xsave_avx512_zmm_hi256") => { ... };
("xsave_avx512_zmm_hi16") => { ... };
("xsave_pkru") => { ... };
("xsave_amx_cfg") => { ... };
("xsave_amx_tile_data") => { ... };
("xsave_apx_gpr") => { ... };
("nx") => { ... };
("pdpe1gb") => { ... };
("rdtscp") => { ... };
("extapic") => { ... };
("invlpgb") => { ... };
($t:tt,) => { ... };
($t:tt) => { ... };
}Available on x86 or x86-64 only.
Expand description
Returns a bool if the current system supports the requested feature
The features available to test are:
tsc- system has a timestamp counter accessible throughrdtscmsr- system supports reading and writing model specific registers throughrdmsrandwrmsrapic- system has an APICcx16- system support 16-byte atomicspcid- system supports PCIDs in page tablesx2apic- APIC supports x2APIC featurestsc_deadline- local APIC timer supports TSC deadline modexsave- system supports thexsaveinstructionhypervisor- system is running in a hypervisorarat- local APIC timer continues counting while sleepingintel_thread_director- system supports Intel Thread Directorfsgsbase- system supports writing to thefsandgsregisters from userspacetsc_adjust- system supports adjusting TSC value per-coresmep- system supports Supervisor Mode Execution Preventioninvpcid- system supports invalidating an entire PCID from the TLBsmap- system supports Supervisor Mode Access Preventionla57- system supports 57-bit virtual addressesrdpid- system supports reading OS core ID fromIA32_TSC_AUXhybrid- system has AMPlass- system supports trapping access based on MSB of addressnmi_src- system supports reporting source of NMI exceptionsxsave_x87- system supports saving x87 registers withxsavexsave_sse- system supports saving SSE registers withxsavexsave_avx- system supports saving AVX registers withxsavexsave_avx512_opmask- system supports saving AVX512 opmask registers withxsavexsave_avx512_zmm_hi256- system supports saving upper 256 bits ofzmm0throughzmm15withxsavexsave_avx512_zmm_hi16- system supports savingzmm16throughzmm31withxsavexsave_pkru- system supports saving PKRU register withxsavexsave_amx_cfg- system supports saving AMXtilecfgregister withxsavexsave_amx_tile_data- system supports saving AMXtmm0throughtmm7registers withxsavexsave_apx_gpr- system supports savingr16throughr31GPRs withsavenx- page tables support no-execute bitpdpe1gb- page tables support 1 GiB huge pagesrdtscp- system supportsrdtscpinstruction to read TSC andIA32_TSC_AUXextapic- APIC support Extended APIC Spaceinvlpgb- system supportsinvlpgbinstruction