[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070105075845.EAFEA250048@il.qumranet.com>
Date: Fri, 05 Jan 2007 07:58:45 -0000
From: Avi Kivity <avi@...ranet.com>
To: kvm-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org, akpm@...l.org, mingo@...e.hu
Subject: [PATCH 9/9] KVM: Simplify test for interrupt window
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@...ranet.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
Index: linux-2.6/drivers/kvm/svm.c
===================================================================
--- linux-2.6.orig/drivers/kvm/svm.c
+++ linux-2.6/drivers/kvm/svm.c
@@ -1206,8 +1206,7 @@ static int interrupt_window_interception
* 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: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -1604,8 +1604,7 @@ static int handle_interrupt_window(struc
* 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists