From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Xen PV IOMMU interface draft C Date: Fri, 10 Jul 2015 15:32:37 -0400 Message-ID: <20150710193237.GA31146@l.oracle.com> References: <557B0C35.4080907@citrix.com> <558D280B.3050806@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZDe30-00069j-1G for xen-devel@lists.xenproject.org; Fri, 10 Jul 2015 19:33:22 +0000 Content-Disposition: inline In-Reply-To: <558D280B.3050806@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Malcolm Crossley Cc: Kevin Tian , Ian Campbell , "Zhang, Yu C" , Andrew Cooper , Paul Durrant , "Lv, Zhiyuan" , Jan Beulich , xen-devel , David Vrabel List-Id: xen-devel@lists.xenproject.org > Xen PV IOMMU hypercall interface > -------------------------------- > A two argument hypercall interface (do_iommu_op). > > ret_t do_iommu_op(XEN_GUEST_HANDLE_PARAM(void) arg, unsigned int count) > > First argument, guest handle pointer to array of `struct pv_iommu_op` > > Second argument, unsigned integer count of `struct pv_iommu_op` elements in array. Is there an upper limit on it? If there is an we hit, what is the return value? Should it be E2BIG and the toolstack (or kernel) should adjust size accordinly? .. snip.. > Linux kernel architecture > ========================= > > The Linux kernel will use the PV-IOMMU hypercalls to map its PFN address > space into the IOMMU. It will map the PFNs to the IOMMU address space using > a 1:1 mapping, it does this by programming a BFN to GFN mapping which matches > the PFN to GFN mapping. > > The native SWIOTLB will be used to handle devices which cannot DMA to all of > the kernel's PFN address space. native? Or the Xen SWIOTLB which consult the P2M space? In which case it is the Xen-SWIOTLB.