[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/5] arm: shared_info page allocation and mapping
On Thu, 2012-02-23 at 18:21 +0000, Stefano Stabellini wrote: > @@ -172,6 +177,14 @@ int map_mmio_regions(struct domain *d, > return create_p2m_entries(d, 0, start_gaddr, end_gaddr, maddr); > } > > +int guest_physmap_add_page(struct domain *d, unsigned long gpfn, > + unsigned long mfn) > +{ > + return create_p2m_entries(d, 0, gpfn << PAGE_SHIFT, > + (gpfn + 1) << PAGE_SHIFT, > + mfn << PAGE_SHIFT); > +} This doesn't actually end up getting called from the common code bits which should call it. Think we need this on top. You can fold into your patch if you prefer. 8<-------------------------------------------- >From 7d26c508e3ef52dcddf562ba506b384a77423919 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@xxxxxxxxxx> Date: Fri, 24 Feb 2012 16:43:11 +0000 Subject: [PATCH] arm: define CONFIG_PAGING_ASSISTANCE This is needed for common code (e.g. XENMEM_populate_physmap) to actually call guest_phys_map. Adjust the API to match what the common code expects. Implement a dummy guest_physmap_remove_page. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/mm.c | 2 +- xen/arch/arm/p2m.c | 15 ++++++++++++--- xen/include/asm-arm/config.h | 2 ++ xen/include/asm-arm/p2m.h | 11 +++++++++-- xen/include/asm-arm/paging.h | 3 +++ 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 0fe0398..cf3de8a 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -380,7 +380,7 @@ static int xenmem_add_to_physmap_once( domain_lock(d); /* Map at new location. */ - rc = guest_physmap_add_page(d, xatp->gpfn, mfn); + rc = guest_physmap_add_page(d, xatp->gpfn, mfn, 0); domain_unlock(d); diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 1a00a50..4c94ef0 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -177,14 +177,23 @@ int map_mmio_regions(struct domain *d, return create_p2m_entries(d, 0, start_gaddr, end_gaddr, maddr); } -int guest_physmap_add_page(struct domain *d, unsigned long gpfn, - unsigned long mfn) +int guest_physmap_add_page(struct domain *d, + unsigned long gpfn, + unsigned long mfn, + unsigned int page_order) { return create_p2m_entries(d, 0, gpfn << PAGE_SHIFT, - (gpfn + 1) << PAGE_SHIFT, + (gpfn + (1<<page_order)) << PAGE_SHIFT, mfn << PAGE_SHIFT); } +void guest_physmap_remove_page(struct domain *d, + unsigned long gpfn, + unsigned long mfn, unsigned int page_order) +{ + ASSERT(0); +} + int p2m_alloc_table(struct domain *d) { struct p2m_domain *p2m = &d->arch.p2m; diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index c2ab0a2..63fb48e 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -7,6 +7,8 @@ #ifndef __ARM_CONFIG_H__ #define __ARM_CONFIG_H__ +#define CONFIG_PAGING_ASSISTANCE 1 + #define CONFIG_PAGING_LEVELS 3 #define CONFIG_ARM 1 diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index c0f2995..d8e8dc8 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -39,8 +39,15 @@ int p2m_populate_ram(struct domain *d, paddr_t start, paddr_t end); * address maddr. */ int map_mmio_regions(struct domain *d, paddr_t start_gaddr, paddr_t end_gaddr, paddr_t maddr); -int guest_physmap_add_page(struct domain *d, unsigned long gpfn, - unsigned long mfn); + +/* Untyped version for RAM only, for compatibility */ +int guest_physmap_add_page(struct domain *d, + unsigned long gfn, + unsigned long mfn, + unsigned int page_order); +void guest_physmap_remove_page(struct domain *d, + unsigned long gpfn, + unsigned long mfn, unsigned int page_order); unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn); diff --git a/xen/include/asm-arm/paging.h b/xen/include/asm-arm/paging.h index 4dc340f..3d7dd95 100644 --- a/xen/include/asm-arm/paging.h +++ b/xen/include/asm-arm/paging.h @@ -1,6 +1,9 @@ #ifndef _XEN_PAGING_H #define _XEN_PAGING_H +#define paging_mode_translate(d) (0) +#define paging_mode_external(d) (0) + #endif /* XEN_PAGING_H */ /* -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |