From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: question about memory allocation for driver domain Date: Mon, 9 Feb 2015 13:08:32 +0000 Message-ID: <1423487312.23098.41.camel@citrix.com> References: <1423141944.24924.118.camel@citrix.com> <54D38B3D.5080805@linaro.org> <54D8706C.6020105@linaro.org> <1423479192.23098.25.camel@citrix.com> <54D896F3.7040602@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54D896F3.7040602@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Oleksandr Tyshchenko , Andrii Anisov , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Mon, 2015-02-09 at 19:16 +0800, Julien Grall wrote: > >> The last problem but not the least is, depending on which backend you > >> are running in the 1:1 domain (such blkback), grant won't be mapped 1:1 > >> to the guest, so you will have to use swiotlb in order to use the right > >> DMA address. For instance, without swiotlb, guest won't be able to use a > >> disk partition via blkfront. This because the backend is giving directly > >> the grant address to the block driver. To solve this, we have to use > >> swiotlb and set specific DMA callback. For now, there are only used for > >> DOM0. > > > > Not much we can do here except extend the dom0 code here to > > conditionally enable itself for other domains. > > You mean in the guest kernel? Maybe we have to introduce a new feature > flags indicating is the domain is using 1:1 mapping or not? Something along those lines I would expect. I'm not sure it fits, but this has some similarities with the DTB bindings used to indicate to the guest that a device is protected (in the SMMU sense) which you did a while back. It's possible we could reuse or extend that interface -- after all 1:1 is somewhat like having an SMMU, at least to the extent that the things the guest is expected to do are the same. Ian.