• Sean Christopherson's avatar
    KVM: x86: SVM: Set EMULTYPE_NO_REEXECUTE for RSM emulation · 35be0ade
    Sean Christopherson authored
    Re-execution after an emulation decode failure is only intended to
    handle a case where two or vCPUs race to write a shadowed page, i.e.
    we should never re-execute an instruction as part of RSM emulation.
    
    Add a new helper, kvm_emulate_instruction_from_buffer(), to support
    emulating from a pre-defined buffer.  This eliminates the last direct
    call to x86_emulate_instruction() outside of kvm_mmu_page_fault(),
    which means x86_emulate_instruction() can be unexported in a future
    patch.
    
    Fixes: 7607b717 ("KVM: SVM: install RSM intercept")
    Cc: Brijesh Singh <brijesh.singh@amd.com>
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    35be0ade
kvm_host.h 44.4 KB