[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Device pass through on XEN on ARM



On Thu, 2014-06-12 at 10:36 +0200, Khandelwal, Shubham wrote:
> Hello Ian,
> 
> On 06/11/2014 03:13 PM, Ian Campbell wrote:
> > > Just to try out the passthrough using the hacks you mentioned, I made
> > > changes in xen to assign a GPIO controlled LED to domU by calling
> > > map_mmio_regions() in the domain creation path. After domU boots, when
> > > I try to access the LED using ioremap, ioread and iowrite from kernel
> > > space I see that I am not able to control the LED,
> 
> > How does it fail? Does it give a fault in the hypervisor or the guest
> > kernel or just silently eat the MMIO writes and not do anything?
> 
> There is a panic in the guest kernel

Can you post it please.

You might also want to add debug to xen/arch/arm/traps.c inject_* to see
if this is a trap which is going via Xen and being redirected to the
guest or if it is generated directly by the MMU.

If it is going via Xen then you could call dump_p2m_lookup on the guest
IPA and see if it looks valid.

> > 0x4xxxxxxx is a RAM region on 4.5 (see the end of
> > xen/include/public/arch-arm.h), I suspect your mmio mapping is being
> > clobbered by a RAM mapping (and therefore that your answer above is
> > "silently does nothing".
> 
> I just checked xen/include/public/arch-arm.h Line 372 is 
> 
> #define GUEST_RAM_BASE    0x80000000ULL
> 
> So as per my understanding 0x4xxxxxxx is not a ram region and thus there 
> should not be any clobbering.

In current 4.5 it is:
 #define GUEST_RAM0_BASE   0x40000000ULL /* 3GB of low RAM @ 1GB */

I suppose you are using 4.5 from before commit 2d72d29bd432 or so.

> > Do you need this to be a 1:1 mapping or could you move it to some free
> > space? Most of the low GB is free (but do check arch-arm.h) to be used
> > for MMIO mappings.
> 
> I do not necessarily need it to be a 1:1 mapping.

If you were clashing with RAM then you could move it to wherever you
wanted then. But given that your rambase is 0x80000000 that doesn't
sound like the issue.

> 
> > Ian.
> 
> Regards
> 
> Shubham Khandelwal



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.