From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: arm: How DomU access to iomem is implemented Date: Mon, 10 Jun 2013 11:38:36 +0100 Message-ID: <51B5ACAC.9050303@linaro.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrii Anisov Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 06/08/2013 01:49 PM, Andrii Anisov wrote: > Hello, Hello, > Could you please clarify how DomU gets an access to iomem (for ARMv7VE)? > We traced that iomem configuration of the DomU comes to hypervisor with > /XEN_DOMCTL_iomem_permission/ domctl. Here iomem space is added to > domain's /iomem_caps/ ranges. But we did not found how these ranges are > actually mapped for DomU. Really these configuration looks unused, on > our board DomU is killed by hypervisor once it tries to access f.e. real > UART. You need to use XEN_DOMCTL_memory_mapping. It will give access and map region in the guest. This hypercall is still missing on ARM, so you need to implement it. > Actually we did a workaround by mapping regions using > /map_mmio_regions() /right here in /XEN_DOMCTL_iomem_permission/ > handling. But it's a real hack, and it would good to know proper way to > get stuff working. Your solution with map_mmio_regions looks good for me. Cheers, -- Julien