]> TLD Linux GIT Repositories - packages/dracut.git/blob - microcode-check.patch
- upstream fix for microcode check
[packages/dracut.git] / microcode-check.patch
1 From 6c80408c8644a0add1907b0593eb83f90d6247b1 Mon Sep 17 00:00:00 2001
2 From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
3 Date: Mon, 14 Aug 2023 12:28:11 +0200
4 Subject: [PATCH] fix(dracut.sh): remove microcode check based on
5  CONFIG_MICROCODE_[AMD|INTEL]
6
7 `CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since
8 https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore
9 this check is wrong and early microcode is always disabled.
10 ---
11  dracut.sh | 11 ++++-------
12  1 file changed, 4 insertions(+), 7 deletions(-)
13
14 diff --git a/dracut.sh b/dracut.sh
15 index e0abdb3b0..3b292910f 100755
16 --- a/dracut.sh
17 +++ b/dracut.sh
18 @@ -1561,23 +1561,20 @@ fi
19  
20  if [[ $early_microcode == yes ]]; then
21      if [[ $hostonly ]]; then
22 -        if [[ $(get_cpu_vendor) == "AMD" ]]; then
23 -            check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
24 -        elif [[ $(get_cpu_vendor) == "Intel" ]]; then
25 -            check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
26 +        if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
27 +            check_kernel_config CONFIG_MICROCODE || unset early_microcode
28          else
29              unset early_microcode
30          fi
31      else
32 -        ! check_kernel_config CONFIG_MICROCODE_AMD \
33 -            && ! check_kernel_config CONFIG_MICROCODE_INTEL \
34 +        ! check_kernel_config CONFIG_MICROCODE \
35              && unset early_microcode
36      fi
37      # Do not complain on non-x86 architectures as it makes no sense
38      case "${DRACUT_ARCH:-$(uname -m)}" in
39          x86_64 | i?86)
40              [[ $early_microcode != yes ]] \
41 -                && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
42 +                && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"
43              ;;
44          *) ;;
45      esac