Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64 Disable KCOV - by raising the interrupt level...



details:   https://anonhg.NetBSD.org/src/rev/78a2a1e3390c
branches:  trunk
changeset: 966827:78a2a1e3390c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Nov 17 14:07:00 2019 +0000

description:
Disable KCOV - by raising the interrupt level - in the TLB IPI handler,
because this is only noise.

diffstat:

 sys/arch/amd64/amd64/vector.S     |   6 +++++-
 sys/arch/amd64/include/frameasm.h |  13 ++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diffs (63 lines):

diff -r 52afdde9cfe9 -r 78a2a1e3390c sys/arch/amd64/amd64/vector.S
--- a/sys/arch/amd64/amd64/vector.S     Sun Nov 17 12:32:31 2019 +0000
+++ b/sys/arch/amd64/amd64/vector.S     Sun Nov 17 14:07:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vector.S,v 1.70 2019/03/07 10:16:07 nonaka Exp $       */
+/*     $NetBSD: vector.S,v 1.71 2019/11/17 14:07:00 maxv Exp $ */
 
 /*
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -316,7 +316,9 @@
 IDTVEC(handle_lapic_tlb)
        movq    _C_LABEL(local_apic_va),%rax
        movl    $0,LAPIC_EOI(%rax)
+       KCOV_DISABLE
        callq   _C_LABEL(pmap_tlb_intr)
+       KCOV_ENABLE
        INTRFASTEXIT
 IDTVEC_END(handle_lapic_tlb)
 IDTVEC(handle_x2apic_tlb)
@@ -324,7 +326,9 @@
        xorl    %eax,%eax
        xorl    %edx,%edx
        wrmsr
+       KCOV_DISABLE
        callq   _C_LABEL(pmap_tlb_intr)
+       KCOV_ENABLE
        INTRFASTEXIT
 IDTVEC_END(handle_x2apic_tlb)
 
diff -r 52afdde9cfe9 -r 78a2a1e3390c sys/arch/amd64/include/frameasm.h
--- a/sys/arch/amd64/include/frameasm.h Sun Nov 17 12:32:31 2019 +0000
+++ b/sys/arch/amd64/include/frameasm.h Sun Nov 17 14:07:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: frameasm.h,v 1.46 2019/11/14 16:23:52 maxv Exp $       */
+/*     $NetBSD: frameasm.h,v 1.47 2019/11/17 14:07:00 maxv Exp $       */
 
 #ifndef _AMD64_MACHINE_FRAMEASM_H
 #define _AMD64_MACHINE_FRAMEASM_H
@@ -6,6 +6,7 @@
 #ifdef _KERNEL_OPT
 #include "opt_xen.h"
 #include "opt_svs.h"
+#include "opt_kcov.h"
 #include "opt_kmsan.h"
 #endif
 
@@ -267,6 +268,16 @@
 #define KMSAN_INIT_RET(sz)     /* nothing */
 #endif
 
+#ifdef KCOV
+#define KCOV_DISABLE                   \
+       incl    CPUVAR(IDEPTH)
+#define KCOV_ENABLE                    \
+       decl    CPUVAR(IDEPTH)
+#else
+#define KCOV_DISABLE           /* nothing */
+#define KCOV_ENABLE            /* nothing */
+#endif
+
 #define        INTRENTRY \
        subq    $TF_REGSIZE,%rsp        ; \
        INTR_SAVE_GPRS                  ; \



Home | Main Index | Thread Index | Old Index