Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46634 )
Change subject: cpu/intel/common: Fix regression ......................................................................
cpu/intel/common: Fix regression
Fix the logic introduced in CB:46276 "cpu/intel/common: only lock AES-NI when supported" which needs to be negated.
Change-Id: Icaf882625529842ea0aedf39147fc9a9e6081e43 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/cpu/intel/common/common_init.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/46634/1
diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c index 4568014..a54e891 100644 --- a/src/cpu/intel/common/common_init.c +++ b/src/cpu/intel/common/common_init.c @@ -273,7 +273,7 @@ if (!CONFIG(SET_MSR_AESNI_LOCK_BIT)) return;
- if (cpu_get_feature_flags_ecx() & CPUID_AES) + if (!(cpu_get_feature_flags_ecx() & CPUID_AES)) return;
/* Only run once per core as specified in the MSR datasheet */
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46634 )
Change subject: cpu/intel/common: Fix regression ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46634 )
Change subject: cpu/intel/common: Fix regression ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/46634/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46634/1//COMMIT_MSG@9 PS1, Line 9: Fix the logic introduced in CB:46276 : "cpu/intel/common: only lock AES-NI when supported" : which needs to be negated. Nit: I suggest the following commit message:
cpu/intel/common: Fix boot failure
Commit 469a99b (cpu/intel/common: only lock AES-NI when supported) forgot to negate a check, so the AES-NI MSR is locked only when the CPU does *not* support it, which causes a GP fault. Invert it.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46634 )
Change subject: cpu/intel/common: Fix regression ......................................................................
Patch Set 1: Code-Review+2
good catch, patrick! thank you
Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46634 )
Change subject: cpu/intel/common: Fix regression ......................................................................
cpu/intel/common: Fix regression
Fix the logic introduced in CB:46276 "cpu/intel/common: only lock AES-NI when supported" which needs to be negated.
Change-Id: Icaf882625529842ea0aedf39147fc9a9e6081e43 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46634 Reviewed-by: Christian Walter christian.walter@9elements.com Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Michael Niewöhner foss@mniewoehner.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/cpu/intel/common/common_init.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Christian Walter: Looks good to me, approved Michael Niewöhner: Looks good to me, approved
diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c index 4568014..a54e891 100644 --- a/src/cpu/intel/common/common_init.c +++ b/src/cpu/intel/common/common_init.c @@ -273,7 +273,7 @@ if (!CONFIG(SET_MSR_AESNI_LOCK_BIT)) return;
- if (cpu_get_feature_flags_ecx() & CPUID_AES) + if (!(cpu_get_feature_flags_ecx() & CPUID_AES)) return;
/* Only run once per core as specified in the MSR datasheet */