* [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64
@ 2014-06-26 16:30 Ian Campbell
2014-06-26 17:01 ` Julien Grall
2014-06-27 8:07 ` Jan Beulich
0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-26 16:30 UTC (permalink / raw)
To: xen-devel; +Cc: julien.grall, tim, Ian Campbell, stefano.stabellini
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 <ian.campbell@citrix.com>
---
Needless to say I consider this important for 4.4 backport...
---
xen/arch/arm/Rules.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 76b35d9..b5bf5cb 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64
2014-06-26 16:30 [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64 Ian Campbell
@ 2014-06-26 17:01 ` Julien Grall
2014-06-27 8:07 ` Jan Beulich
1 sibling, 0 replies; 4+ messages in thread
From: Julien Grall @ 2014-06-26 17:01 UTC (permalink / raw)
To: Ian Campbell, xen-devel; +Cc: tim, stefano.stabellini
Hi Ian,
On 06/26/2014 05:30 PM, Ian Campbell 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 <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
> ---
> Needless to say I consider this important for 4.4 backport...
+1. I'm a bit surprised that it doesn't happen often.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64
2014-06-26 16:30 [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64 Ian Campbell
2014-06-26 17:01 ` Julien Grall
@ 2014-06-27 8:07 ` Jan Beulich
2014-06-27 9:32 ` Ian Campbell
1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2014-06-27 8:07 UTC (permalink / raw)
To: Ian Campbell; +Cc: tim, julien.grall, xen-devel, stefano.stabellini
>>> On 26.06.14 at 18:30, <ian.campbell@citrix.com> 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 <ian.campbell@citrix.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64
2014-06-27 8:07 ` Jan Beulich
@ 2014-06-27 9:32 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-27 9:32 UTC (permalink / raw)
To: Jan Beulich; +Cc: tim, julien.grall, xen-devel, stefano.stabellini
On Fri, 2014-06-27 at 09:07 +0100, Jan Beulich wrote:
> >>> On 26.06.14 at 18:30, <ian.campbell@citrix.com> 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 <ian.campbell@citrix.com>
> > ---
> > 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-27 9:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 16:30 [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64 Ian Campbell
2014-06-26 17:01 ` Julien Grall
2014-06-27 8:07 ` Jan Beulich
2014-06-27 9:32 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.