xen/riscv: disable fpu

Disable FPU to detect illegal usage of floating point in kernel
space.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@gmail.com>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2023-03-20 17:10:34 +01:00
1 parent 9bf21fcaef
commit d1e6767459
1 file changed
+7
+7
View File
@@ -6,6 +6,13 @@ ENTRY(start)
/* Mask all interrupts */
csrw CSR_SIE, zero
/*
* Disable FPU to detect illegal usage of
* floating point in kernel space
*/
li t0, SSTATUS_FS
csrc CSR_SSTATUS, t0
la sp, cpu0_boot_stack
li t0, STACK_SIZE
add sp, sp, t0
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.