From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: RFC: vfio API changes needed for powerpc Date: Wed, 3 Apr 2013 13:39:43 -0500 Message-ID: <1365014383.25627.5@snotra> References: <1364938725.2882.184.camel@bling.home> <1364943035.24520.28@snotra> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: (from b08248@gmail.com on Wed Apr 3 13:32:26 2013) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org To: Stuart Yoder Cc: Alex Williamson , Wood Scott-B07421 , "kvm@vger.kernel.org" , "agraf@suse.de" , "qemu-devel@nongnu.org" , Yoder Stuart-B08248 , "iommu@lists.linux-foundation.org" , Bhushan Bharat-R65777 List-Id: iommu@lists.linux-foundation.org On 04/03/2013 01:32:26 PM, Stuart Yoder wrote: > On Tue, Apr 2, 2013 at 5:50 PM, Scott Wood > wrote: > > On 04/02/2013 04:38:45 PM, Alex Williamson wrote: > >> > >> On Tue, 2013-04-02 at 16:08 -0500, Stuart Yoder wrote: > >> > VFIO_IOMMU_MAP_MSI(iova, size) > > > > > > Not sure how you mean "size" to be used -- for MPIC it would be 4K > per bank, > > and you can only map one bank at a time (which bank you're mapping > should be > > a parameter, if only so that the kernel doesn't have to keep > iteration state > > for you). > > The intent was for user space to tell the kernel which windows to use > for MSI. So I envisioned a total size of window-size * > msi-bank-count. Size doesn't tell the kernel *which* banks to use, only how many. If it already knows which banks are used by the group, then it also knows how many are used. And size is misleading because the mapping is not generally going to be contiguous. -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSbH-0006OH-D5 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:40:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNSbD-0008V7-1l for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:39:59 -0400 Received: from mail-db8lp0184.outbound.messaging.microsoft.com ([213.199.154.184]:16370 helo=db8outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSbC-0008Uu-PG for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:39:54 -0400 Date: Wed, 3 Apr 2013 13:39:43 -0500 From: Scott Wood References: <1364938725.2882.184.camel@bling.home> <1364943035.24520.28@snotra> In-Reply-To: (from b08248@gmail.com on Wed Apr 3 13:32:26 2013) Message-ID: <1365014383.25627.5@snotra> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] RFC: vfio API changes needed for powerpc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stuart Yoder Cc: Wood Scott-B07421 , "kvm@vger.kernel.org" , "agraf@suse.de" , "iommu@lists.linux-foundation.org" , "qemu-devel@nongnu.org" , Yoder Stuart-B08248 , Alex Williamson , Bhushan Bharat-R65777 On 04/03/2013 01:32:26 PM, Stuart Yoder wrote: > On Tue, Apr 2, 2013 at 5:50 PM, Scott Wood =20 > wrote: > > On 04/02/2013 04:38:45 PM, Alex Williamson wrote: > >> > >> On Tue, 2013-04-02 at 16:08 -0500, Stuart Yoder wrote: > >> > VFIO_IOMMU_MAP_MSI(iova, size) > > > > > > Not sure how you mean "size" to be used -- for MPIC it would be 4K =20 > per bank, > > and you can only map one bank at a time (which bank you're mapping =20 > should be > > a parameter, if only so that the kernel doesn't have to keep =20 > iteration state > > for you). >=20 > The intent was for user space to tell the kernel which windows to use > for MSI. So I envisioned a total size of window-size * =20 > msi-bank-count. Size doesn't tell the kernel *which* banks to use, only how many. If =20 it already knows which banks are used by the group, then it also knows =20 how many are used. And size is misleading because the mapping is not =20 generally going to be contiguous. -Scott=