From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755264AbcAROAS (ORCPT ); Mon, 18 Jan 2016 09:00:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44487 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754958AbcAROAQ (ORCPT ); Mon, 18 Jan 2016 09:00:16 -0500 Date: Mon, 18 Jan 2016 15:00:13 +0100 From: Radim =?utf-8?Q?Krcm=C3=A1r?= To: "Wu, Feng" Cc: "pbonzini@redhat.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/2] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts Message-ID: <20160118140012.GA14830@potion.brq.redhat.com> References: <1450229853-3886-1-git-send-email-feng.wu@intel.com> <1450229853-3886-2-git-send-email-feng.wu@intel.com> <20151223171932.GB7061@potion.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 2016-01-18 05:19+0000, Wu, Feng: >> From: Radim Krčmář [mailto:rkrcmar@redhat.com] >> The drawback is that buggy software that included hardware disabled >> APICs to lowest priority destinations could stop working ... > > Yes, if guest hardware disabled the APIC and we don't check "!dst[i]" above, > interrupts could be still delivered to the hardware disabled APIC, right? The change allows hardware disabled APIC to be selected, but interrupts directed to it are (and should be) dropped on subsequent checks. >> Do you think it's too risky? > > If you think the first loop have big bad impact on the performance, We don't want to do any unnecessary operations in the fast path. > I think > your suggestion above is okay, since it is software's responsibility to make > sure the LAPIC is hardware enabled before receiving the interrupt. I agree, thanks. > However, > this will make the vector-hashing lowest-priority handling slightly different > compare to round-robin, since RR checks "!dst[i]" before injecting the > interrupts. What is your opinion about it? Thanks a lot! I think that differing in forbidden (undefined) cases is not an issue. (We also differ on broadcast delivery, which goes through the slow path and currently omits disabled APICs; that's fine with me.)