[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-cvs
Subject:    [Xen-changelog] [xen master] xen/arm64: Correctly align VFP regs
From:       patchbot () xen ! org
Date:       2014-04-18 8:44:34
Message-ID: E1Wb4PS-0003NK-4Z () xenbits ! xen ! org
[Download RAW message or body]

commit 9b4e96724eeb916f2cd311d9133f00c216caa321
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Apr 10 12:43:57 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:00:47 2014 +0100

    xen/arm64: Correctly align VFP regs
    
    On arm64, VFP instructions requires vfpregs to be 128-byte aligned.
    
    By chance, the field is already correctly aligned. In the case if someone
    decides to add a new field before, Xen will receive a data abort as soon as
    it saves/restores VFP.
    
    We are safe on arm32 as the only constraint is to be 32-byte aligned.
    
    Reported-by: Chen Baozi <baozich@gmail.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/arm64/vfp.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/include/asm-arm/arm64/vfp.h
index 373f156..6ab5d36 100644
--- a/xen/include/asm-arm/arm64/vfp.h
+++ b/xen/include/asm-arm/arm64/vfp.h
@@ -1,9 +1,12 @@
 #ifndef _ARM_ARM64_VFP_H
 #define _ARM_ARM64_VFP_H
 
+/* ARM64 VFP instruction requires fpregs address to be 128-byte aligned */
+#define __vfp_aligned __attribute__((aligned(16)))
+
 struct vfp_state
 {
-    uint64_t fpregs[64];
+    uint64_t fpregs[64] __vfp_aligned;
     uint32_t fpcr;
     uint32_t fpexc32_el2;
     uint32_t fpsr;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic