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 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 To: Stuart Yoder Return-path: Received: from mail-db8lp0185.outbound.messaging.microsoft.com ([213.199.154.185]:16363 "EHLO db8outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756310Ab3DCSjy convert rfc822-to-8bit (ORCPT ); Wed, 3 Apr 2013 14:39:54 -0400 In-Reply-To: (from b08248@gmail.com on Wed Apr 3 13:32:26 2013) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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