[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 3/7] plat/kvm: arm64: Enable the fp/simd at the starting point
Hi Sharan > -----Original Message----- > From: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> > Sent: Monday, April 6, 2020 5:38 PM > To: Justin He <Justin.He@xxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx; > Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; Felipe Huici > <felipe.huici@xxxxxxxxx> > Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx> > Subject: Re: [UNIKRAFT PATCH v3 3/7] plat/kvm: arm64: Enable the fp/simd > at the starting point > > > On 4/2/20 6:18 AM, 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. > > > > 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 > > Do we need to enable the floating point upon entry? > > It might be better to do it at the setup phase in `setup.c` and > implement this as inline assembly If we don't enable fpsimd upon entry, we need to carefully NOT invoking any uk_pr_*/printf debugging interface before enabling fpsimd. Otherwise the guest will be trapped into floatingpoint exception and hang forever. Please note that we can't prevent the uk_pr_* or printf from using q0-q31. What do you think of it? -- Cheers, Justin (Jia He) > Since it is a cpu feature, it might be better to provide functions to > enable and disable it. > > > + > > /* Calculate the image size */ > > ldr x25, =_dtb > > ldr x26, =_end _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |