]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: x86: SVM: Set EMULTYPE_NO_REEXECUTE for RSM emulation
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 29 Aug 2019 17:06:58 +0000 (14:06 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 3 Sep 2019 05:27:57 +0000 (01:27 -0400)
commit10f89f4323c4ff4cd5cbf2c2571ec408fa565794
tree8617f430b5888600721d227f5c1f65119936d1e2
parent92a0d1b47eec5c27d1de060250d52bf4c2290628
KVM: x86: SVM: Set EMULTYPE_NO_REEXECUTE for RSM emulation

BugLink: https://bugs.launchpad.net/bugs/1834522
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: 7607b7174405 ("KVM: SVM: install RSM intercept")
Cc: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry-picked from 35be0aded76b54a24dc8aa678a71bca22273e8d8)
Signed-off-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c