]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] KVM: Simplify test for interrupt window
authorDor Laor <dor.laor@qumranet.com>
Sat, 6 Jan 2007 00:37:00 +0000 (16:37 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 6 Jan 2007 07:55:28 +0000 (23:55 -0800)
No need to test for rflags.if as both VT and SVM specs assure us that on exit
caused from interrupt window opening, 'if' is set.

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/kvm/svm.c
drivers/kvm/vmx.c

index af1e7b3f91719356321fce0bddea00c0603e0706..ccc06b1b91b56e5d198b78e3c70e0f4a211b19d8 100644 (file)
@@ -1206,8 +1206,7 @@ static int interrupt_window_interception(struct kvm_vcpu *vcpu,
         * possible
         */
        if (kvm_run->request_interrupt_window &&
-           !vcpu->irq_summary &&
-           (vcpu->svm->vmcb->save.rflags & X86_EFLAGS_IF)) {
+           !vcpu->irq_summary) {
                ++kvm_stat.irq_window_exits;
                kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
                return 0;
index e6ea76cdfdbd8c4d3ecde7418ec152bc5fe7ffb7..d4701cb4c65424e6b5d9267f2347c42445632ccf 100644 (file)
@@ -1604,8 +1604,7 @@ static int handle_interrupt_window(struct kvm_vcpu *vcpu,
         * possible
         */
        if (kvm_run->request_interrupt_window &&
-           !vcpu->irq_summary &&
-           (vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF)) {
+           !vcpu->irq_summary) {
                kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
                ++kvm_stat.irq_window_exits;
                return 0;