KVM: VMX: Fix pending exception processing
authorAvi Kivity <avi@qumranet.com>
Thu, 3 Jul 2008 11:50:12 +0000 (14:50 +0300)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:15:13 +0000 (10:15 +0200)
commit35920a356957eea9fd1f9da043f93469e8d72eab
tree941be8b75035690659f7d244f87e6d66ea6ec2f3
parent26eef70c3e8c76e73dff2579c792fc7355f8a291
KVM: VMX: Fix pending exception processing

The vmx code assumes that IDT-Vectoring can only be set when an exception
is injected due to the exception in question.  That's not true, however:
if the exception is injected correctly, and later another exception occurs
but its delivery is blocked due to a fault, then we will incorrectly assume
the first exception was not delivered.

Fix by unconditionally dequeuing the pending exception, and requeuing it
(or the second exception) if we see it in the IDT-Vectoring field.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/vmx.c