public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: arjan@linux.intel.com, ashok.raj@intel.com, bp@alien8.de,
	linux-kernel@vger.kernel.org, nik.borisov@suse.com,
	x86@kernel.org, qiuxu.zhuo@intel.com
Subject: Re: [patch V2 03/37] x86/microcode/intel: Move microcode functions out of cpu/intel.c
Date: Wed, 23 Aug 2023 19:46:20 +0200	[thread overview]
Message-ID: <878ra1ejo3.ffs@tglx> (raw)
In-Reply-To: <20230823125144.27587-1-qiuxu.zhuo@intel.com>

On Wed, Aug 23 2023 at 20:51, Qiuxu Zhuo wrote:
>> -#define get_totalsize(mc) \
>> -	(((struct microcode_intel *)mc)->hdr.datasize ? \
>> -	 ((struct microcode_intel *)mc)->hdr.totalsize : \
>> -	 DEFAULT_UCODE_TOTALSIZE)
>> +#define DEFAULT_UCODE_DATASIZE		(2000)
>>  
>> ...
>> +
>> +static inline unsigned int get_totalsize(struct microcode_header_intel *hdr)
>> +{
>> +	return hdr->datasize ? : DEFAULT_UCODE_TOTALSIZE;
>
> I tested this patch series and observed that the inline code above failed
> the late microcode loading with the error message:
>
>     [  117.100299] microcode: Error: bad microcode data file size.
>
> According to the original get_totalsize() macro, seems like it should be:
>
>     return hdr->datasize ? hdr->totalsize : DEFAULT_UCODE_TOTALSIZE;
>
> With this minor change, the late microcode loading was successful, and the
> expected message was displayed:

Yes. I messed that up. Borislav already fixed it up when applying the
first 9 patches.


  reply	other threads:[~2023-08-23 17:46 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12 19:58 [patch V2 00/37] x86/microcode: Cleanup and late loading enhancements Thomas Gleixner
2023-08-12 19:58 ` [patch V2 01/37] x86/mm: Remove unused microcode.h include Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-12 19:58 ` [patch V2 02/37] x86/microcode: Hide the config knob Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-14 21:01   ` [patch V2 02/37] " Josh Triplett
2023-08-14 21:19     ` Borislav Petkov
2023-08-14 23:57       ` Josh Triplett
2023-08-15  8:25         ` Borislav Petkov
2023-08-12 19:58 ` [patch V2 03/37] x86/microcode/intel: Move microcode functions out of cpu/intel.c Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-23 12:51   ` [patch V2 03/37] " Qiuxu Zhuo
2023-08-23 17:46     ` Thomas Gleixner [this message]
2023-08-12 19:58 ` [patch V2 04/37] x86/microcode: Include vendor headers into microcode.h Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Ashok Raj
2023-08-12 19:58 ` [patch V2 05/37] x86/microcode: Make reload_early_microcode() static Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-12 19:58 ` [patch V2 06/37] x86/microcode/intel: Rename get_datasize() since its used externally Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Ashok Raj
2023-08-12 19:58 ` [patch V2 07/37] x86/microcode: Move core specific defines to local header Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-12 19:58 ` [patch V2 08/37] x86/microcode/intel: Remove debug code Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-12 19:58 ` [patch V2 09/37] x86/microcode/intel: Remove pointless mutex Thomas Gleixner
2023-08-13  6:55   ` Nikolay Borisov
2023-08-13  9:08     ` Thomas Gleixner
2023-08-13 17:26   ` [tip: x86/microcode] " tip-bot2 for Thomas Gleixner
2023-08-12 19:58 ` [patch V2 10/37] x86/microcode/intel: Rip out mixed stepping support for Intel CPUs Thomas Gleixner
2023-08-12 19:58 ` [patch V2 11/37] x86/microcode/intel: Simplify scan_microcode() Thomas Gleixner
2023-08-12 19:58 ` [patch V2 12/37] x86/microcode/intel: Simplify and rename generic_load_microcode() Thomas Gleixner
2023-08-14 13:19   ` Borislav Petkov
2023-08-14 14:40     ` Thomas Gleixner
2023-08-12 19:58 ` [patch V2 13/37] x86/microcode/intel: Cleanup code further Thomas Gleixner
2023-08-12 19:58 ` [patch V2 14/37] x86/microcode/intel: Simplify early loading Thomas Gleixner
2023-08-12 19:58 ` [patch V2 15/37] x86/microcode/intel: Save the microcode only after a successful late-load Thomas Gleixner
2023-08-12 19:59 ` [patch V2 16/37] x86/microcode/intel: Switch to kvmalloc() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 17/37] x86/microcode/intel: Unify microcode apply() functions Thomas Gleixner
2023-08-12 19:59 ` [patch V2 18/37] x86/microcode/intel: Rework intel_cpu_collect_info() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 19/37] x86/microcode/intel: Reuse intel_cpu_collect_info() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 20/37] x86/microcode/intel: Rework intel_find_matching_signature() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 21/37] x86/microcode/amd: Read revision from hardware in collect_cpu_info_amd() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 22/37] x86/microcode: Remove pointless apply() invocation Thomas Gleixner
2023-08-12 19:59 ` [patch V2 23/37] x86/microcode: Get rid of the schedule work indirection Thomas Gleixner
2023-08-12 19:59 ` [patch V2 24/37] x86/microcode: Clean up mc_cpu_down_prep() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 25/37] x86/microcode: Handle "nosmt" correctly Thomas Gleixner
2023-08-12 19:59 ` [patch V2 26/37] x86/microcode: Clarify the late load logic Thomas Gleixner
2023-08-13 20:02   ` Nikolay Borisov
2023-08-12 19:59 ` [patch V2 27/37] x86/microcode: Sanitize __wait_for_cpus() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 28/37] x86/microcode: Add per CPU result state Thomas Gleixner
2023-08-12 19:59 ` [patch V2 29/37] x86/microcode: Add per CPU control field Thomas Gleixner
2023-08-12 19:59 ` [patch V2 30/37] x86/microcode: Provide new control functions Thomas Gleixner
2023-08-12 19:59 ` [patch V2 31/37] x86/microcode: Replace the all in one rendevouz handler Thomas Gleixner
2023-08-12 19:59 ` [patch V2 32/37] x86/microcode: Rendezvous and load in NMI Thomas Gleixner
2023-08-12 19:59 ` [patch V2 33/37] x86/microcode: Protect against instrumentation Thomas Gleixner
2023-08-12 19:59 ` [patch V2 34/37] x86/apic: Provide apic_force_nmi_on_cpu() Thomas Gleixner
2023-08-12 19:59 ` [patch V2 35/37] x86/microcode: Handle "offline" CPUs correctly Thomas Gleixner
2023-08-12 19:59 ` [patch V2 36/37] x86/microcode: Prepare for minimal revision check Thomas Gleixner
2023-08-12 19:59 ` [patch V2 37/37] x86/microcode/intel: Add a minimum required revision for late-loads Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878ra1ejo3.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=arjan@linux.intel.com \
    --cc=ashok.raj@intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nik.borisov@suse.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox