From: Dor Laor Date: Sat, 6 Jan 2007 00:37:00 +0000 (-0800) Subject: [PATCH] KVM: Simplify test for interrupt window X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=022a93080c269e913793bea3a9a7fed06ca7d29b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] 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 Signed-off-by: Avi Kivity Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index af1e7b3f9171..ccc06b1b91b5 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -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; diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index e6ea76cdfdbd..d4701cb4c654 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -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;