From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758394AbcGKKkJ (ORCPT ); Mon, 11 Jul 2016 06:40:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36995 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbcGKKkI (ORCPT ); Mon, 11 Jul 2016 06:40:08 -0400 Subject: Re: [PATCH v2 11/13] KVM: x86: add KVM_CAP_X2APIC_API To: Yang Zhang , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20160707171550.14675-1-rkrcmar@redhat.com> <20160707171550.14675-12-rkrcmar@redhat.com> <630f1159-53b4-aeca-ed36-c94e9bf75790@gmail.com> <053e042b-c523-9c10-51e5-59a5ac164bc5@redhat.com> <26250689-9263-58a0-7700-1fa83a1dc96e@gmail.com> <813844d3-d644-a213-23b1-4d6648e8a8f4@gmail.com> Cc: "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu From: Paolo Bonzini Message-ID: <1084e9f1-f461-8104-0c47-6e9dd3ac7787@redhat.com> Date: Mon, 11 Jul 2016 12:40:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <813844d3-d644-a213-23b1-4d6648e8a8f4@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 11 Jul 2016 10:40:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07/2016 12:33, Yang Zhang wrote: > On 2016/7/11 17:17, Paolo Bonzini wrote: >> On 11/07/2016 10:56, Yang Zhang wrote: >>> On 2016/7/11 15:44, Paolo Bonzini wrote: >>>> On 11/07/2016 08:06, Yang Zhang wrote: >>>> If interrupt remapping is on, KVM_CAP_X2APIC_API is needed even with 8 >>>> VCPUs, I think. Otherwise KVM will believe that 0xff is "broadcast" >>>> rather than "cluster 0, CPUs 0-7". >>> >>> If interrupt remapping is using, what 0xff means is relying on which >>> mode the destination CPU is in. I think there is no KVM_CAP_X2APIC_API >>> needed since interrupt remapping table gives all the information. >> >> If you have EIM 0xff never means broadcast, but KVM sees a 0xff in the >> interrupt route or KVM_SIGNAL_MSI argument and translates it into a >> broadcast. > > I see your point. I thought there would be a new irq router(like > KVM_IRQ_ROUTING_IR) to handle all interrupts after turn on IR and > KVM_CAP_X2APIC_API would be dropped. KVM_CAP_X2APIC_API seems simpler to me than a new type of irq routing. > So we will continue to use > KVM_IRQ_ROUTING_IRQCHIP and KVM_IRQ_ROUTING_MSI for interrupt from IR, > right? Actually only KVM_IRQ_ROUTING_MSI, because that's the only one that is available with split irqchip. Paolo