Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938705AbcLTRLW (ORCPT ); Tue, 20 Dec 2016 12:11:22 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:35462 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934560AbcLTRLR (ORCPT ); Tue, 20 Dec 2016 12:11:17 -0500 Subject: Re: [PATCH 6/6] KVM: lapic: do not scan IRR when delivering an interrupt To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1482140838-6303-1-git-send-email-pbonzini@redhat.com> <1482140838-6303-7-git-send-email-pbonzini@redhat.com> Cc: rkrcmar@redhat.com, rkagan@virtuozzo.com, dplotnikov@virtuozzo.com From: Paolo Bonzini Message-ID: Date: Tue, 20 Dec 2016 18:11:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1482140838-6303-7-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 488 Lines: 15 On 19/12/2016 10:47, Paolo Bonzini wrote: > + if (!test_bit(vector, vcpu_to_synic(vcpu)->auto_eoi_bitmap)) > + apic_set_isr(vector, apic); > > + apic_clear_irr(vector, apic); > + __apic_update_ppr(apic, &ppr); Hmm, EOI does apic_update_ppr, so for auto-EOI interrupts I think it's safer to do apic_update_ppr instead. You could have to interrupts injected at the same time, and the lower-priority interrupt would be lost if the higher-priority interrupt does automatic EOI. Paolo