KVM: x86: set ctxt->have_exception in x86_decode_insn()
authorJan Dakinevich <jan.dakinevich@virtuozzo.com>
Tue, 27 Aug 2019 13:07:08 +0000 (13:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:10:05 +0000 (13:10 +0200)
commit933e3e2b5070058097089d77281ce2704d031070
tree16d8f688d2319c4a8387987c0db11ad6b601157f
parent9723e445860410737dc272278219347a488aabae
KVM: x86: set ctxt->have_exception in x86_decode_insn()

commit c8848cee74ff05638e913582a476bde879c968ad upstream.

x86_emulate_instruction() takes into account ctxt->have_exception flag
during instruction decoding, but in practice this flag is never set in
x86_decode_insn().

Fixes: 6ea6e84309ca ("KVM: x86: inject exceptions produced by x86_decode_insn")
Cc: stable@vger.kernel.org
Cc: Denis Lunev <den@virtuozzo.com>
Cc: Roman Kagan <rkagan@virtuozzo.com>
Cc: Denis Plotnikov <dplotnikov@virtuozzo.com>
Signed-off-by: Jan Dakinevich <jan.dakinevich@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/emulate.c
arch/x86/kvm/x86.c