• Sean Christopherson's avatar
    KVM: x86: Exit to userspace on emulation skip failure · 738fece4
    Sean Christopherson authored
    Kill a few birds with one stone by forcing an exit to userspace on skip
    emulation failure.  This removes a reference to EMULATE_FAIL, fixes a
    bug in handle_ept_misconfig() where it would exit to userspace without
    setting run->exit_reason, and fixes a theoretical bug in SVM's
    task_switch_interception() where it would overwrite run->exit_reason on
    a return of EMULATE_USER_EXIT.
    
    Note, this technically doesn't fully fix task_switch_interception()
    as it now incorrectly handles EMULATE_FAIL, but in practice there is no
    bug as EMULATE_FAIL will never be returned for EMULTYPE_SKIP.
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    738fece4
x86.c 265 KB