Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932274AbcLSJvG (ORCPT ); Mon, 19 Dec 2016 04:51:06 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33706 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764AbcLSJrZ (ORCPT ); Mon, 19 Dec 2016 04:47:25 -0500 From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: rkrcmar@redhat.com, rkagan@virtuozzo.com, dplotnikov@virtuozzo.com Subject: [PATCH 2/6] KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on EOI Date: Mon, 19 Dec 2016 10:47:14 +0100 Message-Id: <1482140838-6303-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1482140838-6303-1-git-send-email-pbonzini@redhat.com> References: <1482140838-6303-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 34 On EOI, there is no need to set KVM_REQ_EVENT unconditionally. The PPR update is already setting it if resetting the ISR bit causes PPR to decrease. Even a level-triggered IOAPIC interrupt will set KVM_REQ_EVENT on a reinjection (ioapic_service -> kvm_irq_delivery_to_apic and from there to __apic_accept_irq). Signed-off-by: Paolo Bonzini --- arch/x86/kvm/lapic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index e35cbd44c505..70c7428b7a57 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1066,7 +1066,6 @@ static int apic_set_eoi(struct kvm_lapic *apic) kvm_hv_synic_send_eoi(apic->vcpu, vector); kvm_ioapic_send_eoi(apic, vector); - kvm_make_request(KVM_REQ_EVENT, apic->vcpu); return vector; } @@ -1081,7 +1080,6 @@ void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector) trace_kvm_eoi(apic, vector); kvm_ioapic_send_eoi(apic, vector); - kvm_make_request(KVM_REQ_EVENT, apic->vcpu); } EXPORT_SYMBOL_GPL(kvm_apic_set_eoi_accelerated); -- 1.8.3.1