Repository navigation
arm64: cpufeature: hide WFxT on Apple M4+ without a forced override - #1455
Merged
Merged
Conversation
Apple M4 and later cores have WFxT hidden by injecting "id_aa64isar2.wfxt=0" into the early ID register override after the boot arguments are parsed. The override mechanism exists for boot arguments, so init_cpu_ftr_reg() reports it at warning level on every boot: CPU features: SYS_ID_AA64ISAR2_EL1[3:0]: forced to 0 Clear the WFxT field when each CPU's ID registers are recorded instead. The sanitised ID_AA64ISAR2_EL1 still reads WFxT as absent, so ARM64_HAS_WFXT stays off, KVM guests do not see it and HWCAP2_WFXT is not set. A boot argument still cannot re-enable it: "id_aa64isar2.wfxt=1" is above the lower safe value and is ignored. Nothing used the override before the boot CPU records its ID registers: __delay() only takes the WFxT path once ARM64_HAS_WFXT is finalised. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apple M4 and later cores have WFxT hidden by injecting
id_aa64isar2.wfxt=0into the early ID register override.init_cpu_ftr_reg()reports every override at warning level, so each M4-class boot logs:This clears the WFxT field when each CPU's ID registers are recorded (
__cpuinfo_store_cpu()), and drops the injected override.Behaviour is unchanged:
ID_AA64ISAR2_EL1reads WFxT = 0, soARM64_HAS_WFXTstays off, KVM guests don't see WFxT, andHWCAP2_WFXTis not set.id_aa64isar2.wfxt=1on the command line still cannot re-enable it. It is above the lower safe value, so it is ignored.__delay()only takes the WFxT path once the capability is finalised.Testing: J616s (T6040), a one-shot boot of the fleet52 tree with this commit, compared with fleet52 boots without it:
CPU features: SYS_ID_AA64ISAR2_EL1[3:0]: forced to 0is gone. Kernel warnings went from 4 to 3, and no new kernel or userspace lines appeared./proc/cpuinfoFeatures line is identical to fleet52, andwfxtis absent.🤖 Generated with Claude Code