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

Re: [Xen-users] Does XEN on ARM support allocation for physical continuous memory on DOM0/U?



Hello,

On 20/10/15 13:16, Tom Ting[äéå] wrote:
> Thanks for your information.
> The thing we are actually doing is that we are planing to do is constructing 
> three domains :
> Dom0 : As small as possible
> DomU_Android : Android System.
> DomU_Function : handles some hardware specific function.
> 
> We want two DomU have no interference with each other and handle their own 
> HW/Driver.
> For Android system, memory such as ION / Framebuffer will need to be 
> physical-contiguous.

Having the memory physically contiguous is not enough. You also have to
map the physical region at the same base address in the guest to be able
to program the DMA correctly.

Although, beware that device passthrough is not safe without IOMMU. Your
Android guest will be able to issue DMA request to any part of the RAM
and could interfere with DomU_Function.

If you care about security, I would advice you to look at implementing
new PV drivers.

> As you mentioned, if we want to solve the memory-contiguous problem on DomU, 
> we have to hack through the domain-memory-allocation path right?
> Could you tell us where is the location of DomU memory construction flow that 
> we could do some modification?

FIY, a thread has been started few months ago with some idea how to
support 1:1 mapping for guest (see [1]).

In outline, you first have to modify the memory allocation in the
toolstack (see populate_guest_memory in tools/libxc/xc_dom_arm.c) to
handle the contiguous size you want to support.

You then need to find a way to get the physical address of the block
from the hypervisor and write them in the guest DT. This also means the
guest layout which is currently hardcoded (see
xen/include/public/arch-arm.h) needs to be modified for your purpose.

At that point, you may hit some problem with the Xen allocator because
nothing guarantee that you will be able to find enough space to allocate
the memory contiguously.

> Really thanks for your help.

Regards,

[1]
http://lists.xenproject.org/archives/html/xen-devel/2015-02/msg00570.html

-- 
Julien Grall

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

 


Rackspace

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