From: "Jan Beulich" Subject: Re: [RFC] Dom0 PV IOMMU control design (draft A) Date: Tue, 15 Apr 2014 07:50:40 +0100 Message-ID: <534CF2E00200007800008C97@nat28.tlf.novell.com> References: <5348264B.1040800@citrix.com> <20140411175036.GA15429@phenom.dumpdata.com> <534BD097.1090407@citrix.com> <20140414125157.GB22384@phenom.dumpdata.com> <534BF8BA.2040601@citrix.com> <534C1F84020000780000896C@nat28.tlf.novell.com> <534C0F21.4090800@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WZxCf-0005bO-De for xen-devel@lists.xenproject.org; Tue, 15 Apr 2014 06:50:45 +0000 In-Reply-To: <534C0F21.4090800@citrix.com> Content-Disposition: inline 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: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 14.04.14 at 18:38, wrote: > On 14/04/14 16:48, Jan Beulich wrote: >>>>> On 14.04.14 at 17:03, wrote: >>> On 14/04/14 13:51, Konrad Rzeszutek Wilk wrote: >>>> On Mon, Apr 14, 2014 at 01:12:07PM +0100, Malcolm Crossley wrote: >>>>> On 11/04/14 18:50, Konrad Rzeszutek Wilk wrote: >>>>>> On Fri, Apr 11, 2014 at 06:28:43PM +0100, Malcolm Crossley wrote: >>>>>>> Hi, >>>>>>> >>>>>>> Here is a design for allowing Dom0 PV guests to control the IOMMU. >>>> With the device driver domains I think you should also rename the >>>> 'dom0' to device driver or 'hardware domain' - as this functionality >>>> should be possible within an PV guest with PCI passthrough for example. >>> Currently Xen only allows Dom0 IOMMU access to all (expect Xen) MFN's. >> >> Except in dom0-strict mode, which your proposal doesn't even >> support. Yet mid/long term that mode should imo be what Dom0 >> should be run in by default. >> > dom0-strict mode could be supported by validating the mfn's passed in > via the map operation to belong to the DomU making the hypercall. > > Also, if we modify the grant map hypercalls to allow dev_bus_addr of > struct gnttab_map_grant_ref to be used as an input and output parameter > then we can specify the required BFN mapping for grant map pages. If we > also delay IOTLB flushes as part of batched grant map operations then > performance should also be OK. > > I believe the two changes above would should be enough to support > 'driver domains'. Would you agree? Yes, at a first glance this should be all that's needed. Jan