Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-18 Thread Alexander Graf
On 17.05.2009, at 08:48, Gleb Natapov wrote: On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); - nested_svm_intr(svm); + if(!(svm-vcpu.arch.hflags HF_GIF_MASK)) +

Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-17 Thread Gleb Natapov
On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); - nested_svm_intr(svm); + if(!(svm-vcpu.arch.hflags HF_GIF_MASK)) + return; Why would this

Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-17 Thread Alexander Graf
On 17.05.2009, at 08:48, Gleb Natapov g...@redhat.com wrote: On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); -nested_svm_intr(svm); +if(!(svm-vcpu.arch.hflags

[PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-15 Thread Alexander Graf
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. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/svm.c |