[v2,00/14] IFS multi test image support and misc changes

Message ID 20221107225323.2733518-1-jithu.joseph@intel.com
Headers
Series IFS multi test image support and misc changes |

Message

Jithu Joseph Nov. 7, 2022, 10:53 p.m. UTC
  Changes in v2
 - Rebased ontop of v6.1-rc4
 Boris
   - Moved exported functions (microcode_sanity_check(),
      find_matching_signature ) from microcode/intel.c to cpu/intel.c 
      (patch4,6)
   - Removed microcode metadata specific code changes to
      microcode_sanity_check() (patch6)
   - Moved find_meta_data() from common to IFS driver (Patch 8)
  Sohil
   - Dropped portions of Patch2 from v1 and folded remaining to Patch12
   - Rewording multiple commits
   - Avoid meta prefix in fields of metadata_header (patch8)
   - Defining MICROCODE_HEADER_VER* into common location (patch6, 9)
   - Elaborating error messages w.r.t processor flags (patch9)
   - Changed sysfs_emit() parameter (patch 11)

v1 patches available from
Link: https://lore.kernel.org/lkml/20221021203413.1220137-1-jithu.joseph@intel.com/

Initial implementation of IFS driver assumed a single IFS test image
file with a fixed name.

Subsequently, it became evident that supporting more than one
test image file is needed to provide more comprehensive
test coverage. (Test coverage in this scenario refers to testing
more transistors in the core to identify faults).

This series makes the driver aware of multiple scan test image files,
modifies IFS test image file headers to make it fully compatible
with microcode headers and adds a few other bug fixes and changes.

Patch organization:
Patches 1, and 2: bug fixes
Patch 3: Removes image loading during init path 
Patch 4, 5 and 6: exports a couple of microcode/intel.c functions
                  for use by driver

Rest of them are IFS driver changes
Patches 9: IFS header format changes to make it fully compatible
           to intel microcode header format
Patch 7,8 and 10: microcode/IFS metadata section related
Patches 11, 12 and 13: native support for multiple scan test image files
Patch 14: reverts the broken flag

Ashok Raj (1):
  platform/x86/intel/ifs: Add metadata support

Jithu Joseph (13):
  platform/x86/intel/ifs: Remove unused selection
  platform/x86/intel/ifs: return a more appropriate Error code
  platform/x86/intel/ifs: Remove image loading during init
  x86/microcode/intel: Expose find_matching_signature() for IFS
  x86/microcode/intel: Use appropriate type in microcode_sanity_check()
  x86/microcode/intel: Expose microcode_sanity_check()
  x86/microcode/intel: Use a reserved field for metasize
  platform/x86/intel/ifs: Use generic microcode headers and functions
  platform/x86/intel/ifs: Add metadata validation
  platform/x86/intel/ifs: Remove reload sysfs entry
  platform/x86/intel/ifs: Add current_batch sysfs entry
  Documentation/ABI: Update IFS ABI doc
  Revert "platform/x86/intel/ifs: Mark as BROKEN"

 arch/x86/include/asm/cpu.h                    |   2 +
 arch/x86/include/asm/microcode_intel.h        |   5 +-
 drivers/platform/x86/intel/ifs/ifs.h          |  27 ++-
 arch/x86/kernel/cpu/intel.c                   | 129 +++++++++++
 arch/x86/kernel/cpu/microcode/intel.c         | 146 +------------
 drivers/platform/x86/intel/ifs/core.c         |   7 +-
 drivers/platform/x86/intel/ifs/load.c         | 205 ++++++++++--------
 drivers/platform/x86/intel/ifs/runtest.c      |  10 +-
 drivers/platform/x86/intel/ifs/sysfs.c        |  41 ++--
 .../ABI/testing/sysfs-platform-intel-ifs      |  30 +--
 drivers/platform/x86/intel/ifs/Kconfig        |   4 -
 11 files changed, 330 insertions(+), 276 deletions(-)


base-commit: f0c4d9fc9cc9462659728d168387191387e903cc
  

Comments

Borislav Petkov Nov. 10, 2022, 9:59 a.m. UTC | #1
On Mon, Nov 07, 2022 at 02:53:09PM -0800, Jithu Joseph wrote:
> Changes in v2
>  - Rebased ontop of v6.1-rc4
>  Boris
>    - Moved exported functions (microcode_sanity_check(),
>       find_matching_signature ) from microcode/intel.c to cpu/intel.c 
>       (patch4,6)
>    - Removed microcode metadata specific code changes to
>       microcode_sanity_check() (patch6)
>    - Moved find_meta_data() from common to IFS driver (Patch 8)

What's the upstreaming plan here - I'm assuming I should take the
microcode patches through the tip tree?

Or should I take the whole thing through tip so that there's no
confusion and having to sync and share branches between trees?

Thx.
  
Hans de Goede Nov. 10, 2022, 9:37 p.m. UTC | #2
Hi Boris,

On 11/10/22 10:59, Borislav Petkov wrote:
> On Mon, Nov 07, 2022 at 02:53:09PM -0800, Jithu Joseph wrote:
>> Changes in v2
>>  - Rebased ontop of v6.1-rc4
>>  Boris
>>    - Moved exported functions (microcode_sanity_check(),
>>       find_matching_signature ) from microcode/intel.c to cpu/intel.c 
>>       (patch4,6)
>>    - Removed microcode metadata specific code changes to
>>       microcode_sanity_check() (patch6)
>>    - Moved find_meta_data() from common to IFS driver (Patch 8)
> 
> What's the upstreaming plan here - I'm assuming I should take the
> microcode patches through the tip tree?
> 
> Or should I take the whole thing through tip so that there's no
> confusion and having to sync and share branches between trees?

I have just reviewed all the platform/x86/intel/ifs changes
and they all look good to me.

I think it is the best and easiest if you just take the whole
branch.

I don't have any changes pending under drivers/platform/x86/intel/ifs
so there should not be any conflicts.

Regards,

Hans
  
Jithu Joseph Nov. 10, 2022, 9:58 p.m. UTC | #3
On 11/10/2022 1:37 PM, Hans de Goede wrote:
> Hi Boris,
> 
> On 11/10/22 10:59, Borislav Petkov wrote:
>> On Mon, Nov 07, 2022 at 02:53:09PM -0800, Jithu Joseph wrote:
>>> Changes in v2
>>>  - Rebased ontop of v6.1-rc4
>>>  Boris
>>>    - Moved exported functions (microcode_sanity_check(),
>>>       find_matching_signature ) from microcode/intel.c to cpu/intel.c 
>>>       (patch4,6)
>>>    - Removed microcode metadata specific code changes to
>>>       microcode_sanity_check() (patch6)
>>>    - Moved find_meta_data() from common to IFS driver (Patch 8)
>>
>> What's the upstreaming plan here - I'm assuming I should take the
>> microcode patches through the tip tree?
>>
>> Or should I take the whole thing through tip so that there's no
>> confusion and having to sync and share branches between trees?
> 
> I have just reviewed all the platform/x86/intel/ifs changes
> and they all look good to me.
> 

Hans, Thanks for reviewing.

Boris,  I have fixes from Sohil's comments (mainly  for patch 06/14). Let me know
if you have any other issues that need touching up in x86 parts (04 - 07).

I will post a cleaned-up series next week.

Jithu