[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: p2m: Introduce a helper to remove an entry in the page table
commit 47f43d1645c8751240415de8609a4c4b07ea3591 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Tue Dec 1 17:52:11 2015 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Dec 15 11:58:54 2015 +0000 xen/arm: p2m: Introduce a helper to remove an entry in the page table Factorize the code to remove an entry in p2m_remove_pte so we can re-use it later. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/p2m.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index f28ae3f..ae0acf0 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -367,6 +367,14 @@ static inline void p2m_write_pte(lpae_t *p, lpae_t pte, bool_t flush_cache) clean_dcache(*p); } +static inline void p2m_remove_pte(lpae_t *p, bool_t flush_cache) +{ + lpae_t pte; + + memset(&pte, 0x00, sizeof(pte)); + p2m_write_pte(p, pte, flush_cache); +} + /* * Allocate a new page table page and hook it in via the given entry. * apply_one_level relies on this returning 0 on success @@ -839,8 +847,7 @@ static int apply_one_level(struct domain *d, *flush = true; - memset(&pte, 0x00, sizeof(pte)); - p2m_write_pte(entry, pte, flush_cache); + p2m_remove_pte(entry, flush_cache); p2m_mem_access_radix_set(p2m, paddr_to_pfn(*addr), p2m_access_rwx); *addr += level_size; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |