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

Re: [Minios-devel] [UNIKRAFT PATCHv6 08/37] arch/arm64: Avoid using the floating-point and Advanced SIMD registers



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 14.09.2018 09:56, Wei Chen wrote:
From: Wei Chen <Wei.Chen@xxxxxxx>

On Arm64, sometimes, the GCC will use floating-point and Advanced
SIMD registers to pass parameters. For example, the va_list will
use the SIMD&FP registers (like q0, q1) to store parameters, no
matter you are using floating-point or not.

But before we include the FP & SIMD registers in context switch,
we should not enable the FP & SIMD access for kernel. So, we use
the GCC -mgeneral-regs-only flag to force GCC to use generic
registers only util the floating-point and Advanced SIMD registers
are required actually.

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
  arch/arm/arm64/Makefile.uk | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm/arm64/Makefile.uk b/arch/arm/arm64/Makefile.uk
index d4ba7e3..54b1b01 100644
--- a/arch/arm/arm64/Makefile.uk
+++ b/arch/arm/arm64/Makefile.uk
@@ -1,6 +1,11 @@
-ASFLAGS  += -D__ARM_64__
-CFLAGS   += -D__ARM_64__ -fms-extensions
-CXXFLAGS += -D__ARM_64__ -fms-extensions
+# TODO:
+# Before we include the FP & SIMD registers in context switch,
+# we should not enable the FP & SIMD access for kernel. As GCC will
+# the FP & SIMD registers to pass parameters, we use -mgeneral-regs-only
+# flag to force GCC to use generic registers
+ASFLAGS  += -D__ARM_64__ -mgeneral-regs-only
+CFLAGS   += -D__ARM_64__ -fms-extensions -mgeneral-regs-only
+CXXFLAGS += -D__ARM_64__ -fms-extensions -mgeneral-regs-only
# GCC support -mcpu=native for arm64 from 6.0
  ifeq ($(CONFIG_MARCH_ARM64_NATIVE),y)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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