From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752296AbaLSL7e (ORCPT ); Fri, 19 Dec 2014 06:59:34 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:47954 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbaLSL7c (ORCPT ); Fri, 19 Dec 2014 06:59:32 -0500 Message-ID: <5494131E.9030505@redhat.com> Date: Fri, 19 Dec 2014 12:59:26 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Wu, Feng" , Paolo Bonzini , Yang Zhang , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , Gleb Natapov , "dwmw2@infradead.org" , "joro@8bytes.org" , Alex Williamson , Jiang Liu CC: "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , KVM list , Eric Auger Subject: Re: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI References: <1418397300-10870-1-git-send-email-feng.wu@intel.com> <1418397300-10870-14-git-send-email-feng.wu@intel.com> <549307A5.3060305@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/12/2014 02:30, Wu, Feng wrote: >>> How this can work well? All subsequent interrupts are delivered to >>> one vCPU? It shouldn't be the best solution, need more consideration. >> >> Well, it's a hardware limitation. The alternative (which is easy to >> implement) is to only do PI for single-CPU interrupts. This should work >> well for multiqueue NICs (and of course for UP guests :)), so perhaps >> it's a good idea to only support that as a first attempt. >> >> Paolo > > Paolo, what do you mean by "single-CPU interrupts"? Do you mean we don't > support lowest priority interrupts for PI? But Linux OS uses lowest priority > for most of the case? If so, we can hardly get benefit from this feature for > Linux guest OS. You can post lowest priority interrupts if they are delivered to a single CPU, in which case they are effectively fixed priority. If they are broadcast to multiple CPUs, do not post them. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI Date: Fri, 19 Dec 2014 12:59:26 +0100 Message-ID: <5494131E.9030505@redhat.com> References: <1418397300-10870-1-git-send-email-feng.wu@intel.com> <1418397300-10870-14-git-send-email-feng.wu@intel.com> <549307A5.3060305@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , KVM list , Eric Auger To: "Wu, Feng" , Paolo Bonzini , Yang Zhang , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , Gleb Natapov , "dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org" , Alex Williamson , Jiang Liu Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: kvm.vger.kernel.org On 19/12/2014 02:30, Wu, Feng wrote: >>> How this can work well? All subsequent interrupts are delivered to >>> one vCPU? It shouldn't be the best solution, need more consideration. >> >> Well, it's a hardware limitation. The alternative (which is easy to >> implement) is to only do PI for single-CPU interrupts. This should work >> well for multiqueue NICs (and of course for UP guests :)), so perhaps >> it's a good idea to only support that as a first attempt. >> >> Paolo > > Paolo, what do you mean by "single-CPU interrupts"? Do you mean we don't > support lowest priority interrupts for PI? But Linux OS uses lowest priority > for most of the case? If so, we can hardly get benefit from this feature for > Linux guest OS. You can post lowest priority interrupts if they are delivered to a single CPU, in which case they are effectively fixed priority. If they are broadcast to multiple CPUs, do not post them. Paolo