|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm64: PTE handling
commit 1024642c62062dd8e12037ffaab2ed9754d74b35
Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Feb 22 08:57:50 2013 +0000
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Feb 22 12:14:51 2013 +0000
xen: arm64: PTE handling
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
---
xen/include/asm-arm/arm32/page.h | 20 ++++++++++++++++++++
xen/include/asm-arm/arm64/page.h | 15 +++++++++++++++
xen/include/asm-arm/page.h | 20 --------------------
3 files changed, 35 insertions(+), 20 deletions(-)
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index 073b8d1..a384f04 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.
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 636fb63..99b7296 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -3,6 +3,21 @@
#ifndef __ASSEMBLY__
+/* Write a pagetable entry */
+static inline void write_pte(lpae_t *p, lpae_t pte)
+{
+ asm volatile (
+ /* Ensure any writes have completed with the old mappings. */
+ "dsb sy;"
+ "str %0, [%1];" /* Write the entry */
+ "dsb sy;"
+ /* Push this cacheline to the PoC so the rest of the system sees it. */
+ "dc cvac, %1;"
+ /* Ensure that the data flush is completed before proceeding */
+ "dsb sy;"
+ : : "r" (pte.bits), "r" (p) : "memory");
+}
+
/*
* Flush all hypervisor mappings from the TLB
* This is needed after changing Xen code mappings.
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index 8909375..476b00c 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -230,26 +230,6 @@ static inline lpae_t mfn_to_p2m_entry(unsigned long mfn,
unsigned int mattr)
return e;
}
-/* 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");
-}
-
#if defined(CONFIG_ARM_32)
# include <asm/arm32/page.h>
#elif defined(CONFIG_ARM_64)
--
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 |