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

Re: [Minios-devel] [UNIKRAFT PATCHv4 22/43] plat/kvm: Allow access to floating-point and Advanced SIMD registers



(+ Dave)

On 09/07/18 10:47, Wei Chen wrote:
Hi, Julien,

Hi Wei,


-----Original Message-----
From: Julien Grall <julien.grall@xxxxxxx>
Sent: 2018年7月8日 6:17
To: Wei Chen <Wei.Chen@xxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx;
simon.kuenzer@xxxxxxxxx
Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx>
Subject: Re: [Minios-devel] [UNIKRAFT PATCHv4 22/43] plat/kvm: Allow access to
floating-point and Advanced SIMD registers

Hi,

On 07/06/2018 10:03 AM, Wei Chen wrote:
On Arm64, when we want to print out some message, the va_list will
use the SIMD&FP registers (like q0, q1) to store parameters. So, we
have to disable the trap of accessing floating-point and Advanced SIMD
registers to make va_list use SIMD&FP registers properly.

I don't think this is true. Xen and Linux don't use SIMD&FP registers as
this would require to context switch at every entry. Yet we are able to
use va_list without SIMD&FP registers.


This is true, because Linux and Xen doesn't support float print.
Unikraft kernel just a part of an application, its print library need
To support float. Just like nolibc, when GCC compiling this library,
it doesn't care you are running EL1 or EL0, the generated code will
access q0, q1. When you're running this code in EL1 without SIMD&FP,
system crash.

When will q0, q1 will be accessed? Is it only when floating point will be printed?

Also, IIUC, the kernel code will be compiled with floating point, right? If so, it means the compiler will be able to use floating point for some optimization. This will become a problem when receiving a trap as you would need to context switch the registers (this assume handler may use FP).

Cheers,

--
Julien Grall

_______________________________________________
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®.