Module Name: src
Committed By: jdolecek
Date: Wed Jul 8 11:11:00 UTC 2020
Modified Files:
src/sys/arch/xen/x86: cpu.c
Log Message:
initalize ci_kfpu_spl, to avoid triggering KASSERT() in fpu_kern_enter()
Follows revision 1.177 of sys/arch/x86/x86/cpu.c:
"""
Add a small API for in-kernel FPU operations.
fpu_kern_enter();
/* do FPU stuff */
fpu_kern_leave();
"""
With this DomU kernel boots with:
[ 2.0000571] aes: Intel AES-NI
To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/xen/x86/cpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.137 src/sys/arch/xen/x86/cpu.c:1.138
--- src/sys/arch/xen/x86/cpu.c:1.137 Sat Jun 27 09:54:08 2020
+++ src/sys/arch/xen/x86/cpu.c Wed Jul 8 11:11:00 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.137 2020/06/27 09:54:08 jdolecek Exp $ */
+/* $NetBSD: cpu.c,v 1.138 2020/07/08 11:11:00 jdolecek Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.137 2020/06/27 09:54:08 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.138 2020/07/08 11:11:00 jdolecek Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -232,6 +232,7 @@ cpu_attach(device_t parent, device_t sel
ci->ci_cpuid = caa->cpu_number;
ci->ci_vcpu = NULL;
ci->ci_index = nphycpu++;
+ ci->ci_kfpu_spl = -1;
if (!pmf_device_register(self, NULL, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
@@ -391,6 +392,7 @@ cpu_attach_common(device_t parent, devic
ci->ci_dev = self;
ci->ci_cpuid = cpunum;
ci->ci_vcpuid = cpunum;
+ ci->ci_kfpu_spl = -1;
KASSERT(HYPERVISOR_shared_info != NULL);
KASSERT(cpunum < XEN_LEGACY_MAX_VCPUS);