Re: Performance Regression in Linux Kernel 5.19

From: Borislav Petkov
Date: Sat Sep 10 2022 - 03:52:29 EST


On Fri, Sep 09, 2022 at 11:46:08AM +0000, Manikandan Jagatheesan wrote:
> After performing the bisect between kernel 5.18 and 5.19, we
> identified the root cause to be the enablement of IBRS mitigation
> for spectre_v2 vulnerability by commit 6ad0ad2bf8a6 ("x86/bugs:
> Report Intel retbleed vulnerability").

What I'm wondering about is why does the guest enable IBRS when booting
on your HV?

I'm guessing you're exposing SPEC_CTRL and all the feature flags so that
the detection in spectre_v2_select_mitigation(), the SPECTRE_V2_CMD_AUTO
case, hits.

But then, why are you emulating a CPU which is vulnerable to retbleed?

Because as far as the guest is concerned, filling the RSB on VMEXIT
should be good enough and the guest doesn't have to do anything else.

IOW, X86_BUG_RETBLEED should not be set on the guest booting on your HV.

Hmmm?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette