[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?

>-----Original Message-----
>From: Julien Grall [mailto:julien.grall@xxxxxxxxxx] 
>Sent: Tuesday, October 20, 2015 9:21 PM
>To: Tom Ting[äéå]; Ian Campbell; xen-users@xxxxxxxxxxxxx
>Subject: Re: [Xen-users] Does XEN on ARM support allocation for physical 
>continuous memory on DOM0/U?
>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 
>> 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 
>> Really thanks for your help.
>Julien Grall

Thanks Julien

We decieded to create back/front-end drivers to solve contiguous-memory problem 
on Dom0.
Currently checking through the grant-table / front-backend driver / xenstore 

But I am wondering that will memory operation become bottleneck when using 
grant-table to transfer data since double of the memory operation will be 
needed (please correct me if I am wrong).
        EX : 1. DomU copys data to Grant Page; 2. Dom0 Copys data from Grant 
Page to target memroy.

Or, probably I could reserve a contiguous-memory (probably tens of MB), then 
use grant-table share these pages to DomU.
Then DomU could take these granted pages as contiguous memory?Or is there any 
better advice or probably the overhead could simply been ignored.


Xen-users mailing list



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