Module Name: src Committed By: maxv Date: Sun Nov 17 14:07:00 UTC 2019
Modified Files: src/sys/arch/amd64/amd64: vector.S src/sys/arch/amd64/include: frameasm.h Log Message: Disable KCOV - by raising the interrupt level - in the TLB IPI handler, because this is only noise. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amd64/include/frameasm.h 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/amd64/amd64/vector.S diff -u src/sys/arch/amd64/amd64/vector.S:1.70 src/sys/arch/amd64/amd64/vector.S:1.71 --- src/sys/arch/amd64/amd64/vector.S:1.70 Thu Mar 7 10:16:07 2019 +++ src/sys/arch/amd64/amd64/vector.S Sun Nov 17 14:07:00 2019 @@ -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_END(intr_hyperv_hypercall) 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 @@ IDTVEC(handle_x2apic_tlb) xorl %eax,%eax xorl %edx,%edx wrmsr + KCOV_DISABLE callq _C_LABEL(pmap_tlb_intr) + KCOV_ENABLE INTRFASTEXIT IDTVEC_END(handle_x2apic_tlb) Index: src/sys/arch/amd64/include/frameasm.h diff -u src/sys/arch/amd64/include/frameasm.h:1.46 src/sys/arch/amd64/include/frameasm.h:1.47 --- src/sys/arch/amd64/include/frameasm.h:1.46 Thu Nov 14 16:23:52 2019 +++ src/sys/arch/amd64/include/frameasm.h Sun Nov 17 14:07:00 2019 @@ -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 ; \