Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/nvmm/x86 Move a KASSERT, applies to all branches.



details:   https://anonhg.NetBSD.org/src/rev/ed7749e03959
branches:  trunk
changeset: 997591:ed7749e03959
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Mar 14 19:26:44 2019 +0000

description:
Move a KASSERT, applies to all branches.

diffstat:

 sys/dev/nvmm/x86/nvmm_x86_vmx.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 213608d01d59 -r ed7749e03959 sys/dev/nvmm/x86/nvmm_x86_vmx.c
--- a/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Thu Mar 14 19:15:26 2019 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Thu Mar 14 19:26:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_vmx.c,v 1.17 2019/03/07 15:06:37 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_vmx.c,v 1.18 2019/03/14 19:26:44 maxv Exp $   */
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.17 2019/03/07 15:06:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.18 2019/03/14 19:26:44 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -794,14 +794,14 @@
        paddr_t oldpa __diagused;
 
        KASSERT(kpreempt_disabled());
+#ifdef DIAGNOSTIC
+       vmx_vmptrst(&oldpa);
+       KASSERT(oldpa == cpudata->vmcs_pa);
+#endif
        KASSERT(cpudata->vmcs_refcnt > 0);
        cpudata->vmcs_refcnt--;
 
        if (cpudata->vmcs_refcnt > 0) {
-#ifdef DIAGNOSTIC
-               vmx_vmptrst(&oldpa);
-               KASSERT(oldpa == cpudata->vmcs_pa);
-#endif
                return;
        }
 



Home | Main Index | Thread Index | Old Index