Skip to content

Commit 6d7f062

Browse files
pjcolpSomasundaram Krishnasamy
authored andcommitted
x86/speculation: Fix missing enumeration value warnings
We support an idle mode for both MDS and TAA mitigations, which has caused our code to diverge a bit from upstream. In doing so, we forgot some values in switch statements which also had no default case. This results in the compiler throwing warnings about enumeration values not being handled. Add in the missing switch cases. Orabug: 30833548 Signed-off-by: Patrick Colp <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent c2dee5c commit 6d7f062

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ static void taa_select_mitigation(void)
619619
if ( !(ia32_cap & ARCH_CAP_MDS_NO)) {
620620
switch (mds_mitigation) {
621621
case MDS_MITIGATION_FULL:
622+
case MDS_MITIGATION_VMWERV:
622623
taa_mitigation = TAA_MITIGATION_VERW;
623624
break;
624625
case MDS_MITIGATION_IDLE:
@@ -1581,6 +1582,7 @@ void arch_smt_update(void)
15811582
}
15821583

15831584
switch (taa_mitigation) {
1585+
case TAA_MITIGATION_IDLE:
15841586
case TAA_MITIGATION_VERW:
15851587
case TAA_MITIGATION_UCODE_NEEDED:
15861588
if (sched_smt_active())

0 commit comments

Comments
 (0)