Re: [PATCH v2 2/3] kvm, vmx: move register clearing out of assembly path

From: Stecklina, Julian
Date: Thu Nov 01 2018 - 09:40:36 EST


On Mon, 2018-10-29 at 10:26 -0700, Sean Christopherson wrote:
> I think it's a good idea to explicitly call out that clearing the
> GPRs
> is done to prevent speculative use. Simply stating that we don't
> want
> to let guest register values survive doesn't explain *why*.
>
> What about:
>
> ÂÂÂÂÂÂÂÂ/*
> ÂÂÂÂÂÂÂÂ * Explicitly clear (in addition to marking them as
> clobbered) all GPRs
> ÂÂÂÂÂÂÂÂ * that have not been loaded with host state to prevent
> speculatively
> ÂÂÂÂÂÂÂÂ * using the guest's values.
> ÂÂÂÂÂÂÂÂ */

Sounds good. I've also updated the commit message for the register
clearing commit. I'll repost the patches.

Julian



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich
Ust-ID: DE 289 237 879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B