Re: [PATCH 03/23] x86/srso: Don't probe microcode in a guest

From: Andrew Cooper
Date: Fri Aug 25 2023 - 03:54:15 EST


On 25/08/2023 8:01 am, Josh Poimboeuf wrote:
> To support live migration, the hypervisor sets the "lowest common
> denominator" of features. Probing the microcode isn't allowed because
> any detected features might go away after a migration.
>
> As Andy Cooper states:
>
> "Linux must not probe microcode when virtualised.  What it may see
> instantaneously on boot (owing to MSR_PRED_CMD being fully passed
> through) is not accurate for the lifetime of the VM."
>
> Rely on the hypervisor to set the needed IBPB_BRTYPE and SBPB bits.
>
> Fixes: 1b5277c0ea0b ("x86/srso: Add SRSO_NO support")
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thankyou for doing this patch.