x86: fix incorrect return value for has_if_pschange_mc
PATCH 1/1 x86: fix incorrect return value for has_if_pschange_mc
A return value is missing from this function leading to safe CPUs being marked as vulnerable.
--- xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/vmx/vmx.c +1 -0
@@ -3117,6 +3117,7 @@ static bool __init has_if_pschange_mc(void)case 0x75 :/* Lightning Mountain */ case 0x7a :/* Gemini Lake */ case 0x86 :/* Jacobsville */ +return false;default : printk("Unrecognised CPU model %#x - assuming vulnerable to IF_PSCHANGE_MC\n",
Signature · 1 line
2.51.1
Quoted 2 lines · Kevin Lampis
A return value is missing from this function leading to safe CPUs being marked as vulnerable.
It's not really a return value that's missing. It's just that the Atom block used to fall through into the Phi block to get to it's return false, and this was accidentally dropped with the Phi removal.
Quoted 1 line
Signed-off-by Kevin Lampis <[email protected]>
I can tweak the commit message on commit.
~Andrew
Quoted 8 lines · Andrew Cooper
Quoted 2 lines · Kevin Lampis
A return value is missing from this function leading to safe CPUs being marked as vulnerable.
It's not really a return value that's missing. It's just that the Atom block used to fall through into the Phi block to get to it's return false, and this was accidentally dropped with the Phi removal.
Fixes 85191cf32180 ("x86: drop Xeon Phi support")
Hmm, I indeed screwed up there. However, the fact that there were two blocks of case labels with a blank line between them made them visually non-fall-through. Hence why I keep asking that blank lines only be inserted for non-fall-through situations. In the case here the comments would already have served as sufficient separation of the two groups.
Jan