|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC 0/3] xen/arm: Support XENMEM_exchange
Hi all,
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
I'm not sure how to fix properly the latter hence the RFC. mfn_to_gmfn
is used in few places in the tree, however the implementation for ARM is
completely wrong (see xen/include/asm-arm/mm.h):
#define mfn_to_gmfn(_d, mfn) (mfn)
All the guest but DOM0, which is direct mapped, don't have mfn == gfn.
I think implementing a M2P for ARM is not option because it will only be used
in few places and we don't have much virtual address space left for ARM32.
So I would rather drop the mfn_to_gmfn call from common code.
I've looked at reworking XENMEM_exchange to avoid mfn_to_gmfn. My idea would
be to allocate a temporary array to store the GFN between the two loops.
However, the array would be quite large (the max default is 18 on ARM),
so I don't know if it's acceptable.
Anyone have a better solution?
Regards,
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Julien Grall (3):
xen/common: memory: Introduce check_range_domain_direct_mapped
xen/common: memory: Add support for direct mapped domain in
XEMEM_exchange
xen/common: memory: Move steal_page in common code
xen/arch/arm/mm.c | 6 --
xen/arch/x86/mm.c | 51 -------------
xen/common/memory.c | 195 +++++++++++++++++++++++++++++++----------------
xen/common/page_alloc.c | 51 +++++++++++++
xen/include/asm-arm/mm.h | 4 +-
xen/include/asm-x86/mm.h | 2 -
xen/include/xen/mm.h | 3 +
7 files changed, 186 insertions(+), 126 deletions(-)
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |