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>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2014-04-16 17:00:47 +01:00
1 parent 34f21f9d2b
commit 9b4e96724e
1 file changed
+4 -1
+4 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.