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

Re: [PATCH] xen/riscv: disable fpu


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 24 Feb 2023 16:08:04 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1FU9S0wQ4o14Fb66xxfXuPOpqsc3+yhLf5uCXSDFQ20=; b=nV6dPr0Ut9oehNuswKvOgPxXEl8Wmul+Ad2t4g+Q3z1gH2JPnnwl+2H6pJIFra1EmaKJ24rNjS8MapUIyz/stFJQx+sbnHqDPhr65Lrg3hfyKizd70frfNo0BrKpxNfcm6VwZcN4s7OvpIMPJOT2GFoRDTHjEzU44IzQO8vZxyYaTRK0M3wUuSrHuA/7ltYNYl/3idXXA9/vpJ80cO5BR+K5HlNPss3r9aI4t5Q6oyM3Ww20TSasTObt1+g12NckM1lokQT0JS69dpwWJbT9c207loSL87T7AMDc8nI/Di9j1u+Ptz5i/U8NStoB1ieBkwzgEXF90aL3UVa6t23tPQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RU9FAJZ68e2IE12rXyBC8zxNnhngK6plEM+sJstrfHKozC1XLFTb/pPH97OmpiqAQO/goBfDUzZAdWow+Z4/SQ9h4FcsFbkHrkCcReprXak/SX/eqAiWHl9K8zZIXHM1n/SHlsHEBC9jHMqsrL9i/M1MPl2dz4K9zfz5oLdEpSahAgjkxtDI+owK3pz0TY+jV8HnlMM2FXvK7iZYlxPfbObbXp3BZ88fDngeOV/O5Aeb087cbz+LTSQBgZ6Yw/FZRXBgFr3jwG7nb7jtKPA99icNhvGvnkCVEiDQBkY1i8oJOL8BvwVx68d8sdSion/pVKU8xzl143lj04kTpAeDjQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 24 Feb 2023 15:08:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.02.2023 15:48, Oleksii Kurochko wrote:
> Disable FPU to detect illegal usage of floating point in kernel
> space.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> ---
>  xen/arch/riscv/setup.c | 7 +++++++
>  1 file changed, 7 insertions(+)

This looks to contextually depend on earlier individually sent patches.
When there are dependencies, preferably group the patches in a series,
or if not at the very least call out the dependency in the post-commit-
message area, for committers to be aware.

Jan

> --- a/xen/arch/riscv/setup.c
> +++ b/xen/arch/riscv/setup.c
> @@ -36,6 +36,11 @@ static void __init init_bss(void)
>      }
>  }
>  
> +static void __init disable_fpu(void)
> +{
> +    csr_write(CSR_SSTATUS, SSTATUS_FS);
> +}
> +
>  void __init noreturn start_xen(void)
>  {
>      /*
> @@ -52,6 +57,8 @@ void __init noreturn start_xen(void)
>  
>      init_bss();
>  
> +    disable_fpu();
> +
>      early_printk("Hello from C env\n");
>  
>      trap_init();




 


Rackspace

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