From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933532AbbCRUQN (ORCPT ); Wed, 18 Mar 2015 16:16:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41636 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755402AbbCRUQK (ORCPT ); Wed, 18 Mar 2015 16:16:10 -0400 Date: Wed, 18 Mar 2015 21:16:06 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Bandan Das Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Marcelo Tosatti , chao.zhou@intel.com Subject: Re: [PATCH] KVM: x86: call irq notifiers with directed EOI Message-ID: <20150318201606.GC3309@potion.brq.redhat.com> References: <1426703902-16818-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-03-18 15:37-0400, Bandan Das: > Radim Krčmář writes: > > kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled. > > We need to do that for irq notifiers. (Like with edge interrupts.) > > Wow! It's interesting that this path is only hit with Xen as guest. Linux doesn't use directed EOI ... KVM should fail with anything that depends on PIT, so probably only Xen bothered to implement it :) > I always thought of directed EOI as a "security feature" since broadcast > could lead to interrupt storms (or something like that) :) I think it is just an unpopular optimization for large systems. (With multiple IO-APICs: IRQ handler knows which ones need the EOI, but LAPIC doesn't, hence we avoid some useless poking if OS does it ... EOI interrupt storm happens because right after EOI, the IO-APIC can send another interrupt and real hardware is slow, so CPU manages some cycles before receiving the next one, but KVM works instantaneously.)