KVM: inject #UD if instruction emulation fails and exit to userspace
authorGleb Natapov <gleb@redhat.com>
Mon, 10 May 2010 08:16:56 +0000 (11:16 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:35:40 +0000 (10:35 +0300)
commit6d77dbfc88e37c9efd5c5dd18445cfe819ae17ea
tree96a3afb750d254a99dd43fa4730fd6ff187eb2a0
parent57bc24cfd655c912498983130326b312e0404db1
KVM: inject #UD if instruction emulation fails and exit to userspace

Do not kill VM when instruction emulation fails. Inject #UD and report
failure to userspace instead. Userspace may choose to reenter guest if
vcpu is in userspace (cpl == 3) in which case guest OS will kill
offending process and continue running.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c