On 19.05.2009, at 15:22, Gleb Natapov wrote:
On Tue, May 19, 2009 at 12:54:03PM +0200, Alexander Graf wrote:
While trying to get Hyper-V running, I realized that the interrupt
injection
mechanisms that are in place right now are not 100% correct.
This patch makes nested SVM's interrupt injection behave more like
on a
real machine.
v2 calls BUG_ON when svm_set_irq is called with GIF=0
Signed-off-by: Alexander Graf <agraf@xxxxxxx>
---
arch/x86/kvm/svm.c | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index fa2a710..5b14c9d 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1517,7 +1517,8 @@ static int nested_svm_vmexit_real(struct
vcpu_svm *svm, void *arg1,
/* Kill any pending exceptions */
if (svm->vcpu.arch.exception.pending == true)
nsvm_printk("WARNING: Pending Exception\n");
- svm->vcpu.arch.exception.pending = false;
+ kvm_clear_exception_queue(&svm->vcpu);
+ kvm_clear_interrupt_queue(&svm->vcpu);
What about pending NMI here?
NMI injected to the guest? That should have triggered by now and
caused an #NMI exit, no?
Alex
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html