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

Re: [Xen-devel] PV drivers and zero copying



Hi,

On 01/08/17 20:07, Stefano Stabellini wrote:
On Tue, 1 Aug 2017, Oleksandr Andrushchenko wrote:
Hi, Stefano!

On 07/31/2017 11:28 PM, Stefano Stabellini wrote:
On Mon, 31 Jul 2017, Oleksandr Andrushchenko wrote:
3 Sharing with page exchange (XENMEM_exchange)
==============================================

This API was pointed to me by Stefano Stabellini as one of the possible
ways
to
achieve zero copying and share physically contiguous buffers. It is used
by
x86
SWIOTLB code (xen_create_contiguous_region, [5]), but as per my
understanding
this API cannot be used on ARM as of now [6].  Conclusion: not an option
for
ARM
at the moment
Let me elaborate on this. The purpose of XENMEM_exchange is to exchange
a number of memory pages with an equal number of contiguous memory
pages, possibly even under 4G. The original purpose of the hypercall was
to get DMA-able memory.
this is good to know

So far, it has only been used by Dom0 on x86. Dom0 on ARM doesn't need
it because it is mapped 1:1 by default and device assignment is not
allowed without an IOMMU. However it should work on ARM too, as the
implementation is all common code in Xen.
well, according to [6]:
"Currently XENMEM_exchange is not supported on ARM because the steal_page is
left unimplemented.

However, even if steal_page is implemented, the hypercall can't work for ARM
because:
    - Direct mapped domain is not supported
    - ARM doesn't have a M2P and therefore usage of mfn_to_gmfn is
    invalid"
And what I see at [7] is that it is still EOPNOTSUPP
So, yes, common code is usable for both ARM and x86, but
underlying support for ARM is till not there.
Please correct me if I am wrong here

Ops, I forgot about that! Implementing steal_page on ARM is not be a
problem, and direct mapped domains are not a concern in this scenario.

The issue is mfn_to_gmfn. However, we do not actually need mfn_to_gmfn
to implement xen/common/memory.c:memory_exchange as Julien pointed out
in http://marc.info/?l=xen-devel&m=145037009127660.

Julien, Jan, two years have passed. Do you think we can find a way to
make that old series work for everybody?

I looked at the series and AFAICT Jan was pushing towards M2P.

I've already made my arguments in another thread (see [1]) why I don't think M2P is a solution for ARM.

I really want to kill the use of M2P on ARM because I think this using too much memory for the benefits it brings.

I don't have much time to investigate more on XENMEM_exchange, so I would be grateful if someone pick up that task.

Cheers,

[1] https://lists.xenproject.org/archives/html/xen-devel/2017-05/msg01370.html

--
Julien Grall

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

 


Rackspace

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