On Wed, Jul 22, 2026 at 01:28:40PM -0700, H. Peter Anvin wrote: > On July 22, 2026 1:22:04 PM PDT, Dave Hansen <[email protected]> wrote: > >On 7/22/26 13:18, Yeoreum Yun wrote: > >> Sorry. But do you mean check with cpu_feature_enabled() not with > >> boot_cpu_has()? > >> IIRC, the boot_cpu_has() doesn't use the DISABLE_MASK_BIT_SET() but > >> uses REQUIRED_MASK_BIT_SET() and I don't expect it wouldn't make > >> an optimisation to constant check which is contrast to > >> DISABLE_MASK_BIT_SET(). > > > >Ahh, yes. I forgot about that nuance! Moving to cpu_feature_enabled() > >would be great! > > It is supposed to. That's the point of the required mask.
Sorry, IIUC if the X86_DIRECT_GBPAGES is not enabled, it would fallback to test_cpu_cap() which wouldn't be optimised at compile time IIUC. So It would be better to use cpu_feature_enabled(). Am I missing something? -- Sincerely, Yeoreum Yun

