From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYpjG-0000qA-KG for qemu-devel@nongnu.org; Fri, 20 Mar 2015 01:44:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYpjB-0001T4-GY for qemu-devel@nongnu.org; Fri, 20 Mar 2015 01:44:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYpjB-0001Su-BU for qemu-devel@nongnu.org; Fri, 20 Mar 2015 01:44:13 -0400 Date: Fri, 20 Mar 2015 13:43:09 +0800 From: Jason Wang Message-Id: <1426830189.5879.3@smtp.corp.redhat.com> In-Reply-To: <20150319110319-mutt-send-email-mst@redhat.com> References: <1426671309-13645-1-git-send-email-jasowang@redhat.com> <1426671309-13645-19-git-send-email-jasowang@redhat.com> <20150318134611-mutt-send-email-mst@redhat.com> <1426742363.5002.2@smtp.corp.redhat.com> <20150319110319-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Subject: Re: [Qemu-devel] [PATCH V4 18/19] pci: remove hard-coded bar size in msix_init_exclusive_bar() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: cornelia.huck@de.ibm.com, Keith Busch , Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, Mar 19, 2015 at 6:09 PM, Michael S. Tsirkin wrote: > On Thu, Mar 19, 2015 at 01:19:23PM +0800, Jason Wang wrote: >> >> >> On Wed, Mar 18, 2015 at 8:52 PM, Michael S. Tsirkin >> wrote: >> >On Wed, Mar 18, 2015 at 05:35:08PM +0800, Jason Wang wrote: >> >> This patch let msix_init_exclusive_bar() can accept bar_size >> parameter >> >> other than a hard-coded limit 4096. Then caller can specify a >> bar_size >> >> depends on msix entries and can use up to 2048 msix entries as >> PCI >> >> spec allows. To keep migration compatibility, 4096 is used for >> all >> >> callers and pba were start from half of bar size. >> >> Cc: Keith Busch >> >> Cc: Kevin Wolf >> >> Cc: Stefan Hajnoczi >> >> Cc: Michael S. Tsirkin >> >> Signed-off-by: Jason Wang >> > >> >Hmm this API looks strange. Caller will then have to have >> >msi specific knowledge. >> >Can't we keep the size iternal to msix.c? >> >> Looks like we can, but still need an extra parameter e.g a boolean >> compat_size to let msix_init_exclusive_bar() to use 4096 as bar >> size. > > Why not just figure the size out from # of vectors? Yes, for 2.4 we can figure the size out from the number of vectors.