* arm: How DomU access to iomem is implemented
@ 2013-06-08 12:49 Andrii Anisov
2013-06-10 10:38 ` Julien Grall
2013-06-10 16:16 ` Stefano Stabellini
0 siblings, 2 replies; 7+ messages in thread
From: Andrii Anisov @ 2013-06-08 12:49 UTC (permalink / raw)
To: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 682 bytes --]
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.
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.
Sincerely,
Andrii Anisov.
[-- Attachment #1.2: Type: text/html, Size: 892 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-08 12:49 arm: How DomU access to iomem is implemented Andrii Anisov
@ 2013-06-10 10:38 ` Julien Grall
2013-06-10 10:58 ` Andrii Anisov
2013-06-10 16:16 ` Stefano Stabellini
1 sibling, 1 reply; 7+ messages in thread
From: Julien Grall @ 2013-06-10 10:38 UTC (permalink / raw)
To: Andrii Anisov; +Cc: xen-devel@lists.xen.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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-10 10:38 ` Julien Grall
@ 2013-06-10 10:58 ` Andrii Anisov
2013-06-10 11:13 ` Julien Grall
2013-06-10 16:19 ` Stefano Stabellini
0 siblings, 2 replies; 7+ messages in thread
From: Andrii Anisov @ 2013-06-10 10:58 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 1468 bytes --]
Julien,
Thank you for answer.
As I understand with HW IRQ routing the situation is pretty the same?
Andrii Anisov | Software Engineer
GlobalLogic
Kyiv, 03038, Protasov Business Park, M.Grinchenka, 2/1
P +38.044.492.9695x3664 M +380505738852 S andriyanisov
www.globallogic.com
<http://www.globallogic.com/>
http://www.globallogic.com/email_disclaimer.txt
On Mon, Jun 10, 2013 at 1:38 PM, Julien Grall <julien.grall@linaro.org>wrote:
> 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
>
>
[-- Attachment #1.2: Type: text/html, Size: 4316 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-10 10:58 ` Andrii Anisov
@ 2013-06-10 11:13 ` Julien Grall
2013-06-10 16:19 ` Stefano Stabellini
1 sibling, 0 replies; 7+ messages in thread
From: Julien Grall @ 2013-06-10 11:13 UTC (permalink / raw)
To: Andrii Anisov; +Cc: xen-devel@lists.xen.org
On 06/10/2013 11:58 AM, Andrii Anisov wrote:
> Julien,
>
> Thank you for answer.
> As I understand with HW IRQ routing the situation is pretty the same?
>
Yes.
--
Julien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-08 12:49 arm: How DomU access to iomem is implemented Andrii Anisov
2013-06-10 10:38 ` Julien Grall
@ 2013-06-10 16:16 ` Stefano Stabellini
1 sibling, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2013-06-10 16:16 UTC (permalink / raw)
To: Andrii Anisov; +Cc: xen-devel@lists.xen.org
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
On Sat, 8 Jun 2013, Andrii Anisov wrote:
> 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.
>
> 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.
Unfortunately we didn't get around to implementing device assignment
yet, so for the moment you might have to use workarounds to get it to
work.
In any cases XEN_DOMCTL_iomem_permission is used with PV guests that
don't use nested paging (second state translation) in hardware, so it is
not the right hypercall to call for ARM guests.
Like Julien wrote, the right hypercall to call is
xc_domain_memory_mapping/XEN_DOMCTL_memory_mapping, that is missing on
ARM. However you should be able to write it, basing your implementation
on map_mmio_regions.
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-10 10:58 ` Andrii Anisov
2013-06-10 11:13 ` Julien Grall
@ 2013-06-10 16:19 ` Stefano Stabellini
2013-06-14 6:41 ` Andrii Anisov
1 sibling, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2013-06-10 16:19 UTC (permalink / raw)
To: Andrii Anisov; +Cc: Julien Grall, xen-devel@lists.xen.org
On Mon, 10 Jun 2013, Andrii Anisov wrote:
> Julien,
> Thank you for answer.
> As I understand with HW IRQ routing the situation is pretty the same?
Yes, that's correct. When we do implement device assignment we'll have
to go through all these issues. I expect we'll end up writing something
like xc_physdev_map_pirq/PHYSDEVOP_map_pirq.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arm: How DomU access to iomem is implemented
2013-06-10 16:19 ` Stefano Stabellini
@ 2013-06-14 6:41 ` Andrii Anisov
0 siblings, 0 replies; 7+ messages in thread
From: Andrii Anisov @ 2013-06-14 6:41 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: Julien Grall, xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 65 bytes --]
Stefano,
Thank you for your comments.
Sincerely,
Andrii Anisov
[-- Attachment #1.2: Type: text/html, Size: 341 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-06-14 6:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 12:49 arm: How DomU access to iomem is implemented Andrii Anisov
2013-06-10 10:38 ` Julien Grall
2013-06-10 10:58 ` Andrii Anisov
2013-06-10 11:13 ` Julien Grall
2013-06-10 16:19 ` Stefano Stabellini
2013-06-14 6:41 ` Andrii Anisov
2013-06-10 16:16 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).