diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-02-22 08:57:50 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-02-22 12:14:51 +0000 |
commit | 1024642c62062dd8e12037ffaab2ed9754d74b35 (patch) | |
tree | b87d3d9a8dc14406d3c7aa265460ad43ff9d304d /xen/include/asm-arm/arm32 | |
parent | 5d7331690e317c3c926d0a9592f9d2840a1022d9 (diff) | |
download | xen-1024642c62062dd8e12037ffaab2ed9754d74b35.tar.gz xen-1024642c62062dd8e12037ffaab2ed9754d74b35.tar.bz2 xen-1024642c62062dd8e12037ffaab2ed9754d74b35.zip |
xen: arm64: PTE handling
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/include/asm-arm/arm32')
-rw-r--r-- | xen/include/asm-arm/arm32/page.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h index 073b8d17fa..a384f04ac1 100644 --- a/xen/include/asm-arm/arm32/page.h +++ b/xen/include/asm-arm/arm32/page.h @@ -3,6 +3,26 @@ #ifndef __ASSEMBLY__ +/* Write a pagetable entry. + * + * If the table entry is changing a text mapping, it is responsibility + * of the caller to issue an ISB after write_pte. + */ +static inline void write_pte(lpae_t *p, lpae_t pte) +{ + asm volatile ( + /* Ensure any writes have completed with the old mappings. */ + "dsb;" + /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */ + "strd %0, %H0, [%1];" + "dsb;" + /* Push this cacheline to the PoC so the rest of the system sees it. */ + STORE_CP32(1, DCCMVAC) + /* Ensure that the data flush is completed before proceeding */ + "dsb;" + : : "r" (pte.bits), "r" (p) : "memory"); +} + /* * Flush all hypervisor mappings from the TLB and branch predictor. * This is needed after changing Xen code mappings. |