On 22.07.2024 12:18, Andrew Cooper wrote: > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -738,29 +738,30 @@ static void __init efi_arch_handle_module(const struct > file *file, > > static void __init efi_arch_cpu(void) > { > - uint32_t eax = cpuid_eax(0x80000000U); > + uint32_t eax; > uint32_t *caps = boot_cpu_data.x86_capability; > > boot_tsc_stamp = rdtsc(); > > caps[FEATURESET_1c] = cpuid_ecx(1); > > - if ( (eax >> 16) == 0x8000 && eax > 0x80000000U ) > - { > - caps[FEATURESET_e1d] = cpuid_edx(0x80000001U); > + eax = cpuid_eax(0x80000000U); > + if ( (eax >> 16) != 0x8000 || eax < 0x80000000U )
Only in the context of the further discussion with Alejandro I've spotted that the rhs of the || is now dead code. A proper transformation of the earlier condition would have required <= in place of <. Jan