Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946438AbbHGWzS (ORCPT ); Fri, 7 Aug 2015 18:55:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:13593 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946320AbbHGWzR convert rfc822-to-8bit (ORCPT ); Fri, 7 Aug 2015 18:55:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,631,1432623600"; d="scan'208";a="621453374" From: "Wu, Feng" To: Paolo Bonzini , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" CC: Steve Rutherford , "rkrcmar@redhat.com" , "Wu, Feng" Subject: RE: [PATCH 8/9] KVM: x86: Add EOI exit bitmap inference Thread-Topic: [PATCH 8/9] KVM: x86: Add EOI exit bitmap inference Thread-Index: AQHQ0PomqejHp3FHGkSfW4RavWxi/p4BJU+g Date: Fri, 7 Aug 2015 22:55:10 +0000 Message-ID: References: <1438788228-34856-1-git-send-email-pbonzini@redhat.com> <1438788228-34856-9-git-send-email-pbonzini@redhat.com> <55C4857E.5040306@redhat.com> In-Reply-To: <55C4857E.5040306@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2528 Lines: 72 > -----Original Message----- > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Friday, August 07, 2015 6:17 PM > To: Wu, Feng; linux-kernel@vger.kernel.org; kvm@vger.kernel.org > Cc: Steve Rutherford; rkrcmar@redhat.com > Subject: Re: [PATCH 8/9] KVM: x86: Add EOI exit bitmap inference > > > > On 07/08/2015 09:46, Wu, Feng wrote: > > If I understand it correctly, here you reserve the low part of the routing > > table, and insert entries with KVM_IRQ_ROUTING_MSI type in them, > > then you use this as a hint to KVM to set the EOI bit map. I have two > > concerns: > > > > - Currently, GSI 2 is used for MSI routing, I want to make sure after this > > patch, whether GSI 2 can still be used for _real_ MSI routing, if it can, > > does everything work correctly? > > The patch has no effect if you use the in-kernel IOAPIC. If you use a > userspace IOAPIC you won't be able to use GSI 2 for MSI routing because > it falls in the reserved range. Good to know this, it addresses my concern, thanks! > > > - Now, KVM_IRQ_ROUTING_MSI and KVM_IRQ_ROUTING_IRQCHIP > > type entries cannot share the same map[gsi] (pls refer to the following > > code), so where should be the IOAPIC entries exist in the map[] array? > > With split irqchip, only KVM_IRQ_ROUTING_MSI is used. Does this answer > your question? Ah, I got it, since the IOAPIC is in userspace, there is no need to add the IOAPIC routing information in the routing table. Thanks for the clarification! Thanks, Feng > > Paolo > > > static int setup_routing_entry(struct kvm_irq_routing_table *rt, > > struct kvm_kernel_irq_routing_entry > *e, > > const struct kvm_irq_routing_entry > *ue) > > { > > > > ...... > > > > /* > > * Do not allow GSI to be mapped to the same irqchip more than > once. > > * Allow only one to one mapping between GSI and MSI. > > */ > > hlist_for_each_entry(ei, &rt->map[ue->gsi], link) > > if (ei->type == KVM_IRQ_ROUTING_MSI || > > ue->type == KVM_IRQ_ROUTING_MSI || > > ue->u.irqchip.irqchip == ei->irqchip.irqchip) > > return r; > > > > ...... > > } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/