• Gleb Natapov's avatar
    KVM: VMX: set vmx->emulation_required only when needed. · 14168786
    Gleb Natapov authored
    If emulate_invalid_guest_state=false vmx->emulation_required is never
    actually used, but it ends up to be always set to true since
    handle_invalid_guest_state(), the only place it is reset back to
    false, is never called. This, besides been not very clean, makes vmexit
    and vmentry path to check emulate_invalid_guest_state needlessly.
    The patch fixes that by keeping emulation_required coherent with
    emulate_invalid_guest_state setting.
    Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>