On 2026-10-11T07:05:58, Bin Meng <[email protected]> wrote:
> x86: cpu: Use native_cpuid() in cpuid_ext()
>
> cpuid_ext() saves and restores EBX with 32-bit moves, which clear the
> upper half of RBX in long mode. The assembly does not declare RBX as
> an output, so the compiler cannot account for this change.
>
> Initialize the leaf and subleaf in cpuid_result and use native_cpuid(),
> which declares all four output registers and lets the compiler preserve
> RBX correctly. Keep the structure-returning interface for callers.
>
> Signed-off-by: Bin Meng <[email protected]>
>
> arch/x86/include/asm/cpu.h | 35 +++++++++++++++--------------------
>  1 file changed, 15 insertions(+), 20 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

Reply via email to