On 08/26/2010 11:06 PM, jes.soren...@redhat.com wrote:
From: Jes Sorensen<jes.soren...@redhat.com>

Injecting an NMI while GUEST_INTR_STATE_STI is set may fail,
which can cause an EXIT with invalid state, resulting in the
guest dieing.

Credit to Gleb for figuring out why it was failing and how to
fix it.

Signed-off-by: Jes Sorensen<jes.soren...@redhat.com>
Signed-off-by: Gleb Natapov<g...@redhat.com>
---
  arch/x86/kvm/vmx.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index cf56462..8e95371 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2888,6 +2888,8 @@ static void vmx_inject_nmi(struct kvm_vcpu *vcpu)
                kvm_rip_write(vcpu, vmx->rmode.irq.rip - 1);
                return;
        }
+       vmcs_write32(GUEST_INTERRUPTIBILITY_INFO,
+                       vmcs_read32(GUEST_INTERRUPTIBILITY_INFO)&  
~GUEST_INTR_STATE_STI);

vmcs_clear_bits() is a nicer way of doing this.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to