Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 initalize ci_kfpu_spl, to avoid triggering ...



details:   https://anonhg.NetBSD.org/src/rev/f190f4b81245
branches:  trunk
changeset: 935666:f190f4b81245
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Jul 08 11:11:00 2020 +0000

description:
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

diffstat:

 sys/arch/xen/x86/cpu.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r c0d8b94d3f20 -r f190f4b81245 sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c    Wed Jul 08 10:17:59 2020 +0000
+++ b/sys/arch/xen/x86/cpu.c    Wed Jul 08 11:11:00 2020 +0000
@@ -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 @@
        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 @@
        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);



Home | Main Index | Thread Index | Old Index