[PATCH 9/9] KVM: Simplify test for interrupt window
From: Avi Kivity
Date: Fri Jan 05 2007 - 02:59:04 EST
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@xxxxxxxxxxxx>
Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/