summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorPaolo Bonzini2014-08-20 10:08:23 +0200
committerPaolo Bonzini2014-08-20 13:01:26 +0200
commite0ad0b477c36fde6b0923670647495d07bf42f94 (patch)
tree36b2efe539ed3bffea8e923962bbbd0bf968da21 /arch/x86/kvm/x86.c
parentKVM: emulate: do not return X86EMUL_PROPAGATE_FAULT explicitly (diff)
downloadkernel-qcow2-linux-e0ad0b477c36fde6b0923670647495d07bf42f94.tar.gz
kernel-qcow2-linux-e0ad0b477c36fde6b0923670647495d07bf42f94.tar.xz
kernel-qcow2-linux-e0ad0b477c36fde6b0923670647495d07bf42f94.zip
KVM: emulate: warn on invalid or uninitialized exception numbers
These were reported when running Jailhouse on AMD processors. Initialize ctxt->exception.vector with an invalid exception number, and warn if it remained invalid even though the emulator got an X86EMUL_PROPAGATE_FAULT return code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 737b4bdac41c..cd718c01cdf1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5248,6 +5248,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
ctxt->interruptibility = 0;
ctxt->have_exception = false;
+ ctxt->exception.vector = -1;
ctxt->perm_ok = false;
ctxt->ud = emulation_type & EMULTYPE_TRAP_UD;