Re: [PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Gleb Natapov
I noticed a small bug in previous patch. Use this one instead. (change update_db_intercept(to_svm(svm)) -> update_db_intercept(&svm->vcpu)) If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instr

Re: [PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Gleb Natapov
On Tue, May 05, 2009 at 11:25:13AM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Tue, May 05, 2009 at 10:45:20AM +0200, Jan Kiszka wrote: > >>> @@ -2331,8 +2358,16 @@ static void enable_nmi_window(struct kvm_vcpu > >>> *vcpu) > >>> { > >>> struct vcpu_svm *svm = to_svm(vcpu); > >>> >

Re: [PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, May 05, 2009 at 10:45:20AM +0200, Jan Kiszka wrote: >>> @@ -2331,8 +2358,16 @@ static void enable_nmi_window(struct kvm_vcpu *vcpu) >>> { >>> struct vcpu_svm *svm = to_svm(vcpu); >>> >>> - if (svm->vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) >>> -

Re: [PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Gleb Natapov
On Tue, May 05, 2009 at 10:45:20AM +0200, Jan Kiszka wrote: > > @@ -2331,8 +2358,16 @@ static void enable_nmi_window(struct kvm_vcpu *vcpu) > > { > > struct vcpu_svm *svm = to_svm(vcpu); > > > > - if (svm->vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) > > - enable_irq_wind

Re: [PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Jan Kiszka
Gleb Natapov wrote: > If NMI is received during handling of another NMI it should be injected > immediately after IRET from previous NMI handler, but SVM intercept IRET > before instruction execution so we can't inject pending NMI at this > point and there is not way to request exit when NMI window

[PATCH 9/9] [SVM] inject NMI after IRET from a previous NMI, not before.

2009-05-05 Thread Gleb Natapov
If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instruction execution so we can't inject pending NMI at this point and there is not way to request exit when NMI window opens. This patch fix SVM c