[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH RFCv3 28/32] plat/arm: Make sure fpsimd sysregs writing take effects



As per [1], we need to add isb() to make sure sysreg writing take
effects.

[1] https://github.com/freebsd/freebsd/blob/1b2bc99e/sys/arm64/arm64/vfp.c#L67

Signed-off-by: Jia He <justin.he@xxxxxxx>
---
 plat/common/include/arm/arm64/cpu.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/plat/common/include/arm/arm64/cpu.h 
b/plat/common/include/arm/arm64/cpu.h
index 93ad13b..87d2bbf 100644
--- a/plat/common/include/arm/arm64/cpu.h
+++ b/plat/common/include/arm/arm64/cpu.h
@@ -129,11 +129,17 @@ extern void fpsimd_restore_state(uintptr_t ptr);
 static inline void save_extregs(struct sw_ctx *ctx)
 {
        fpsimd_save_state(ctx->extregs);
+
+       /* make sure sysreg writing takes effects */
+       isb();
 }
 
 static inline void restore_extregs(struct sw_ctx *ctx)
 {
        fpsimd_restore_state(ctx->extregs);
+
+       /* make sure sysreg writing takes effects */
+       isb();
 }
 
 static inline struct sw_ctx *arch_alloc_sw_ctx(struct uk_alloc *allocator)
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.