Re: [PATCH v2 5/8] KVM: x86: Add WARNs to detect out-of-bounds register indices

From: Paolo Bonzini
Date: Wed Oct 09 2019 - 06:50:50 EST


On 27/09/19 23:45, Sean Christopherson wrote:
> Open code the RIP and RSP accessors so as to avoid pointless overhead of
> WARN_ON_ONCE().

Is there actually an overhead here? It is effectively WARN_ON_ONCE(0)
which should be compiled out just fine.

Paolo