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

Re: [Minios-devel] [UNIKRAFT RFC PATCH 2/5] plat/kvm: arm64: Enable the fp/simd at the starting point


  • To: Julien Grall <julien@xxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, "Santiago.Pagani@xxxxxxxxx" <Santiago.Pagani@xxxxxxxxx>
  • From: Justin He <Justin.He@xxxxxxx>
  • Date: Fri, 20 Dec 2019 01:14:17 +0000
  • Accept-language: en-US, zh-CN
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i/97SoxTu7K5xzJFgc3l0CDxm/0RBHGQ1+mXHl3mggQ=; b=V3EDTPwR4Jw/ZHqjPhSZCF73ESoetguL5pGyDamm0EpYI5+EoYK5m5ODG2eDU5Rt/0fMaj1iyhOx8yQ0Otr2FPRTcz+ORKYHjfe0KyQbHYS6hkVHvh2tR78rd4MNPNPLHkjJMR9J5NGW6udCuQXdowdzLB2S2GWU9gMURDN48vE7X0C2GfTkPQRI68Tl0gmUKtL349v3n+pKrExYkgsPWWrJVOPo0aTQMpjZ3tZdFVMpMzHLsvlXCBbxn6neeDa4X2XwAc5cRwXWIzNAEG6Cc3C5bAUifgeGizuKiNlkJQlp3wT7pEB8J/yLR389aLrfJR8lq64tL+MWV8reGwPhuA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ttl2Bv9C6J1/9ZmjEeBWOQU2tgQpjiUQNDmS4N1NOLFBqP+GlJJrLqzKbjmP1n4qeJu1xPdSanU4oTGuuSdROyS3cIDfrp60ahs7MhZlmuUzXYwQ19zka/dK1x8mJw8fL//G6eTfW8jkIsmiC+dY7AVv2vkx8HEfZc+/kqM7dDBHOOjtT5mtrHu6lupmbcTr4jDPoq1yEGDb6Ay8mzes3k1hh5eUu/w3pidGIyqUbt3C18Jj1Is+TuCuAbt9ua6CtoyGN5aMwIm+YA2U6F6BNlSFIN3EaUIak/g8Ih2l01tAcBkUkmsvjACL5WHfHplZcNHyufExWM9siV7BhgsJfw==
  • Authentication-results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Cc: Felipe Huici <felipe.huici@xxxxxxxxx>, Kaly Xin <Kaly.Xin@xxxxxxx>, Julien Grall <Julien.Grall@xxxxxxx>, "Sharan.Santhanam@xxxxxxxxx" <Sharan.Santhanam@xxxxxxxxx>
  • Delivery-date: Fri, 20 Dec 2019 01:14:37 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Thread-index: AQHVtnh/LS76CFi8bku+vtZWKT9mOKfBhhIAgACtzGA=
  • Thread-topic: [Minios-devel] [UNIKRAFT RFC PATCH 2/5] plat/kvm: arm64: Enable the fp/simd at the starting point

Hi Julien

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: Thursday, December 19, 2019 10:35 PM
> To: Justin He <Justin.He@xxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx;
> Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; Santiago.Pagani@xxxxxxxxx
> Cc: Felipe Huici <felipe.huici@xxxxxxxxx>; Kaly Xin <Kaly.Xin@xxxxxxx>;
> Julien Grall <Julien.Grall@xxxxxxx>; Sharan.Santhanam@xxxxxxxxx
> Subject: Re: [Minios-devel] [UNIKRAFT RFC PATCH 2/5] plat/kvm: arm64:
> Enable the fp/simd at the starting point
>
> Hi,
>
> On 19/12/2019 14:27, Jia He wrote:
> > Write the sys reg to enable the fp/simd feature, otherwise it will
> > cause floating point/simd exception when touching q0-q31.
>
> In your first patch you say FPSIMD will be available for application
> only. But here, you will allow Unikraft itself to use it.
>
> So don't you want to turn this only when jumping to the application code?
>
Yes, this might be more graceful.
But there is a corner case in libukdebug of Unikraft.
If we removed -mgeneral-regs-only, some printf* family functions (especially
those have variable length parameters, .e.g va_start/end) will be compiled to
use q0-q31.
Hence, if we want to disable fp/simd in unikraft kernel and enable it in
userspace, we need to specify different compilation options with/without
-mgeneral-regs-only for each unkraft kernel library. I don't know whether
it is acceptable? @Simon Kuenzer What do you think of it?

--
Cheers,
Justin (Jia He)


> >
> > Signed-off-by: Jia He <justin.he@xxxxxxx>
> > ---
> >   plat/kvm/arm/entry64.S | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> >
> > diff --git a/plat/kvm/arm/entry64.S b/plat/kvm/arm/entry64.S
> > index 359a310..1e32268 100644
> > --- a/plat/kvm/arm/entry64.S
> > +++ b/plat/kvm/arm/entry64.S
> > @@ -36,6 +36,7 @@
> >   #include <kvm-arm/mm.h>
> >   #include <arm/cpu_defs.h>
> >   #include <uk/plat/common/sections.h>
> > +#include <uk/config.h>
> >
> >   .global page_table_size
> >   .data
> > @@ -49,6 +50,13 @@ page_table_size:
> >
> >   .text
> >   ENTRY(_libkvmplat_entry)
> > +#ifdef CONFIG_FLOAT_POINT
> > +   /* Enable fp/simd support */
> > +   ldr        x0, =(3 << 20)
> > +   msr        cpacr_el1, x0
> > +   isb
> > +#endif
> > +
> >     /* Calculate the image size */
> >     ldr x25, =_dtb
> >     ldr x26, =_end
> >
>
> --
> Julien Grall
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
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®.