* Sharing MMIO page with DomU on a system with no IOMMU
@ 2012-10-15 16:50 Martin Roth
2012-10-16 7:08 ` Jan Beulich
0 siblings, 1 reply; 5+ messages in thread
From: Martin Roth @ 2012-10-15 16:50 UTC (permalink / raw)
To: xen-devel
Hi -
I'm trying to share an MMIO page from Dom0 running linux with a DomU
running an RTOS so that I can access the GPIO registers directly. The
system I need to get this working on does not have an IOMMU. I'm aware
of the security issues of sharing this area, but don't believe it's an
issue in this case. I've got a Linux module set up and can share memory
between the two domains using the grant table, but I haven't been able
to get this to work for the MMIO page.
Can anyone give me a pointer on how I should go about doing this? I
need the area to actually be shared between both domains, not simply
owned by the RTOS.
Thanks.
Martin Roth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sharing MMIO page with DomU on a system with no IOMMU
2012-10-15 16:50 Sharing MMIO page with DomU on a system with no IOMMU Martin Roth
@ 2012-10-16 7:08 ` Jan Beulich
2012-10-16 7:19 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2012-10-16 7:08 UTC (permalink / raw)
To: Martin Roth; +Cc: Ian Jackson, Ian Campbell, xen-devel
>>> On 15.10.12 at 18:50, Martin Roth <gaumless@gmail.com> wrote:
> I'm trying to share an MMIO page from Dom0 running linux with a DomU
> running an RTOS so that I can access the GPIO registers directly. The
> system I need to get this working on does not have an IOMMU. I'm aware
> of the security issues of sharing this area, but don't believe it's an
> issue in this case. I've got a Linux module set up and can share memory
> between the two domains using the grant table, but I haven't been able
> to get this to work for the MMIO page.
>
> Can anyone give me a pointer on how I should go about doing this? I
> need the area to actually be shared between both domains, not simply
> owned by the RTOS.
Looks like you have to assign the PCI device providing the GPIOs
to the guest, as there doesn't currently appear to be a way to
allow guest access to individual MMIO pages (lacking the MMIO
counterpart to the iports= and irqs= domain config settings).
Ian, Ian - am I overlooking something?
And of course - sharing the MMIO page between Dom0 and guest
is a questionable intention in any case - you rather want it owned
by the DomU, and Dom0 then shouldn't access it at all. Otherwise,
how would you expect accesses to be coordinated?
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sharing MMIO page with DomU on a system with no IOMMU
2012-10-16 7:08 ` Jan Beulich
@ 2012-10-16 7:19 ` Ian Campbell
2012-10-16 7:55 ` Jan Beulich
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2012-10-16 7:19 UTC (permalink / raw)
To: Jan Beulich; +Cc: Martin Roth, Ian Jackson, xen-devel@lists.xen.org
On Tue, 2012-10-16 at 08:08 +0100, Jan Beulich wrote:
> >>> On 15.10.12 at 18:50, Martin Roth <gaumless@gmail.com> wrote:
> > I'm trying to share an MMIO page from Dom0 running linux with a DomU
> > running an RTOS so that I can access the GPIO registers directly. The
> > system I need to get this working on does not have an IOMMU. I'm aware
> > of the security issues of sharing this area, but don't believe it's an
> > issue in this case. I've got a Linux module set up and can share memory
> > between the two domains using the grant table, but I haven't been able
> > to get this to work for the MMIO page.
> >
> > Can anyone give me a pointer on how I should go about doing this? I
> > need the area to actually be shared between both domains, not simply
> > owned by the RTOS.
>
> Looks like you have to assign the PCI device providing the GPIOs
> to the guest, as there doesn't currently appear to be a way to
> allow guest access to individual MMIO pages (lacking the MMIO
> counterpart to the iports= and irqs= domain config settings).
>
> Ian, Ian - am I overlooking something?
iomem= support was committed to xl in xen-unstable last week or the week
before. I think it already existed in xend.
>
> And of course - sharing the MMIO page between Dom0 and guest
> is a questionable intention in any case - you rather want it owned
> by the DomU, and Dom0 then shouldn't access it at all. Otherwise,
> how would you expect accesses to be coordinated?
>
> Jan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sharing MMIO page with DomU on a system with no IOMMU
2012-10-16 7:19 ` Ian Campbell
@ 2012-10-16 7:55 ` Jan Beulich
2012-10-16 8:01 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2012-10-16 7:55 UTC (permalink / raw)
To: Ian Campbell; +Cc: Martin Roth, Ian Jackson, xen-devel@lists.xen.org
>>> On 16.10.12 at 09:19, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2012-10-16 at 08:08 +0100, Jan Beulich wrote:
>> >>> On 15.10.12 at 18:50, Martin Roth <gaumless@gmail.com> wrote:
>> > I'm trying to share an MMIO page from Dom0 running linux with a DomU
>> > running an RTOS so that I can access the GPIO registers directly. The
>> > system I need to get this working on does not have an IOMMU. I'm aware
>> > of the security issues of sharing this area, but don't believe it's an
>> > issue in this case. I've got a Linux module set up and can share memory
>> > between the two domains using the grant table, but I haven't been able
>> > to get this to work for the MMIO page.
>> >
>> > Can anyone give me a pointer on how I should go about doing this? I
>> > need the area to actually be shared between both domains, not simply
>> > owned by the RTOS.
>>
>> Looks like you have to assign the PCI device providing the GPIOs
>> to the guest, as there doesn't currently appear to be a way to
>> allow guest access to individual MMIO pages (lacking the MMIO
>> counterpart to the iports= and irqs= domain config settings).
>>
>> Ian, Ian - am I overlooking something?
>
> iomem= support was committed to xl in xen-unstable last week or the week
> before. I think it already existed in xend.
I fail to spot anything like that in xend - the only use of
domain_iomem_permission() is in server\pciif.py afaics.
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sharing MMIO page with DomU on a system with no IOMMU
2012-10-16 7:55 ` Jan Beulich
@ 2012-10-16 8:01 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2012-10-16 8:01 UTC (permalink / raw)
To: Jan Beulich; +Cc: Martin Roth, Ian Jackson, xen-devel@lists.xen.org
On Tue, 2012-10-16 at 08:55 +0100, Jan Beulich wrote:
> >>> On 16.10.12 at 09:19, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Tue, 2012-10-16 at 08:08 +0100, Jan Beulich wrote:
> >> >>> On 15.10.12 at 18:50, Martin Roth <gaumless@gmail.com> wrote:
> >> > I'm trying to share an MMIO page from Dom0 running linux with a DomU
> >> > running an RTOS so that I can access the GPIO registers directly. The
> >> > system I need to get this working on does not have an IOMMU. I'm aware
> >> > of the security issues of sharing this area, but don't believe it's an
> >> > issue in this case. I've got a Linux module set up and can share memory
> >> > between the two domains using the grant table, but I haven't been able
> >> > to get this to work for the MMIO page.
> >> >
> >> > Can anyone give me a pointer on how I should go about doing this? I
> >> > need the area to actually be shared between both domains, not simply
> >> > owned by the RTOS.
> >>
> >> Looks like you have to assign the PCI device providing the GPIOs
> >> to the guest, as there doesn't currently appear to be a way to
> >> allow guest access to individual MMIO pages (lacking the MMIO
> >> counterpart to the iports= and irqs= domain config settings).
> >>
> >> Ian, Ian - am I overlooking something?
> >
> > iomem= support was committed to xl in xen-unstable last week or the week
> > before. I think it already existed in xend.
>
> I fail to spot anything like that in xend - the only use of
> domain_iomem_permission() is in server\pciif.py afaics.
You are right. I saw iomem in the grep output and neglected to look at
the path.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-16 8:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 16:50 Sharing MMIO page with DomU on a system with no IOMMU Martin Roth
2012-10-16 7:08 ` Jan Beulich
2012-10-16 7:19 ` Ian Campbell
2012-10-16 7:55 ` Jan Beulich
2012-10-16 8:01 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.