On 27/01/2026 4:00 pm, Jan Beulich wrote:
> On 27.01.2026 15:34, Andrew Cooper wrote:
>> --- a/xen/arch/x86/cpu/microcode/core.c
>> +++ b/xen/arch/x86/cpu/microcode/core.c
>> @@ -760,6 +760,7 @@ static int __init early_microcode_load(struct boot_info 
>> *bi)
>>      void *data = NULL;
>>      size_t size;
>>      struct microcode_patch *patch;
>> +    struct cpio_data cd;
>>      int idx = opt_mod_idx;
>>      int rc;
>>  
>> @@ -776,7 +777,6 @@ static int __init early_microcode_load(struct boot_info 
>> *bi)
>>          for ( idx = 0; idx < bi->nr_modules; ++idx )
>>          {
>>              const struct boot_module *bm = &bi->mods[idx];
>> -            struct cpio_data cd;
>>  
>>              /* Search anything unclaimed or likely to be a CPIO archive. */
>>              if ( bm->kind != BOOTMOD_UNKNOWN && bm->kind != BOOTMOD_RAMDISK 
>> )
>> @@ -844,6 +844,18 @@ static int __init early_microcode_load(struct boot_info 
>> *bi)
>>                     idx, size);
>>              return -ENODEV;
>>          }
>> +
>> +        /*
>> +         * If this blob appears to be a CPIO archive, try interpreting it as
>> +         * one.  Otherwise treat it as a raw vendor blob.
>> +         */
>> +        cd = find_cpio_data(ucode_ops.cpio_path, data, size);
>> +        if ( cd.data )
>> +        {
>> +            data = cd.data;
>> +            size = cd.size;
>> +        }
>> +
>>          goto found;
>>      }
> Doesn't microcode_init_cache() then need similar adjustment?

Hmm, yes, but we can actually do that by setting opt_scan=1 here and no
other change.

microcode_init_cache() already has the explicit index to look at, so
opt_scan really becomes an "is cpio" flag.

~Andrew

Reply via email to