xen: arm: make sure gcc doesn't use floating-point registers on arm64
PATCH 1/1 xen: arm: make sure gcc doesn't use floating-point registers on arm64
By using -mgeneral-regs-only which is the Aarch64 equivalent to -msoft-float.
Otherwise gcc will corrupt the d* registers, which we don't save/restore when trapping to/from the hypervisor.
---
Needless to say I consider this important for 4.4 backport...
--- xen/arch/arm/Rules.mk | 1 + 1 file changed, 1 insertion(+)
xen/arch/arm/Rules.mk +1 -0
@@ -28,6 +28,7 @@ endif ifeq ($(TARGET_SUBARCH),arm64) CFLAGS += -mcpu=generic +CFLAGS += -mgeneral-regs-only # No fp registers etc arm32 := n arm64 := y endif
Signature · 1 line
1.7.10.4
Hi Ian,
Quoted 7 lines · Ian Campbell
By using -mgeneral-regs-only which is the Aarch64 equivalent to -msoft-float.
Otherwise gcc will corrupt the d* registers, which we don't save/restore when trapping to/from the hypervisor.
Signed-off-by Ian Campbell <[email protected]>
Quoted 2 lines
---
Needless to say I consider this important for 4.4 backport...
+1. I'm a bit surprised that it doesn't happen often.
Regards,
Signature · 1 line
Julien Grall
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 26.06.14 at 18:30, <[email protected]> wrote:
By using -mgeneral-regs-only which is the Aarch64 equivalent to -msoft-float.
Otherwise gcc will corrupt the d* registers, which we don't save/restore when
trapping to/from the hypervisor.Signed-off-by Ian Campbell <[email protected]>---
Needless to say I consider this important for 4.4 backport...
Agreed - for a fix like this I'm not even certain you'd need to wait for it to make it through the master push gate.
Jan
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 26.06.14 at 18:30, <[email protected]> wrote:
By using -mgeneral-regs-only which is the Aarch64 equivalent to -msoft-float.
Otherwise gcc will corrupt the d* registers, which we don't save/restore when
trapping to/from the hypervisor.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Ian Campbell <[email protected]>---
Needless to say I consider this important for 4.4 backport...Agreed - for a fix like this I'm not even certain you'd need to wait for it to make it through the master push gate.
Since the push gate doesn't even test arm64 at the moment I was certainly planning to skip that delay, yes. (and I would have considered it even if it was being tested...)
Ian.