From: Jan Kiszka <[email protected]>

This abstraction is currently used for mmio region updates. There is no
reason why it could be left empty on ARM. Linux does not do that as
well.

What Linux also does is to map a write barrier on ishst. However,
Jailhouse has no abstraction for write-only barriers, thus cannot use
this mapping for its generic memory_barrier.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm/include/asm/processor.h   | 1 +
 hypervisor/arch/arm64/include/asm/processor.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hypervisor/arch/arm/include/asm/processor.h 
b/hypervisor/arch/arm/include/asm/processor.h
index e5af7921..79b66f39 100644
--- a/hypervisor/arch/arm/include/asm/processor.h
+++ b/hypervisor/arch/arm/include/asm/processor.h
@@ -57,6 +57,7 @@ static inline void memory_barrier(void)

 static inline void memory_load_barrier(void)
 {
+       dmb(ish);
 }

 static inline bool is_el2(void)
diff --git a/hypervisor/arch/arm64/include/asm/processor.h 
b/hypervisor/arch/arm64/include/asm/processor.h
index d2c8101c..b52782b7 100644
--- a/hypervisor/arch/arm64/include/asm/processor.h
+++ b/hypervisor/arch/arm64/include/asm/processor.h
@@ -52,6 +52,7 @@ static inline void memory_barrier(void)

 static inline void memory_load_barrier(void)
 {
+       dmb(ish);
 }

 #endif /* !__ASSEMBLY__ */
--
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/0db943d9a2541f6a4539bd12377c778b1b6024d1.1577125789.git.jan.kiszka%40web.de.

Reply via email to