Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220496
| From | Takao Indoh <indou.takao@jp.fujitsu.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/4] x86: Stop Intel PT and save its registers when panic occurs |
| Date | 2015-09-08 08:00 +0200 |
| Message-ID | <q6k6J-3KE-5@gated-at.bofh.it> (permalink) |
| References | <q6jX3-3zi-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When panic occurs, Intel PT logging is stopped to prevent it from overwrite its log buffer. The registers of Intel PT are saved in the memory on panic, they are needed for debugger to find the last position where Intel PT wrote data. Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com> --- arch/x86/kernel/crash.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index e068d66..78deceb 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -35,6 +35,7 @@ #include <asm/cpu.h> #include <asm/reboot.h> #include <asm/virtext.h> +#include <asm/intel_pt_log.h> /* Alignment required for elf header segment */ #define ELF_CORE_HEADER_ALIGN 4096 @@ -127,6 +128,10 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs) cpu_emergency_vmxoff(); cpu_emergency_svm_disable(); +#ifdef CONFIG_X86_INTEL_PT_LOG + save_intel_pt_registers(); +#endif + disable_local_APIC(); } @@ -172,6 +177,10 @@ void native_machine_crash_shutdown(struct pt_regs *regs) cpu_emergency_vmxoff(); cpu_emergency_svm_disable(); +#ifdef CONFIG_X86_INTEL_PT_LOG + save_intel_pt_registers(); +#endif + #ifdef CONFIG_X86_IO_APIC /* Prevent crash_kexec() from deadlocking on ioapic_lock. */ ioapic_zap_locks(); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/4] x86: Intel Processor Trace Logger Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-08 07:50 +0200
[PATCH v2 3/4] perf/x86/intel/pt: Add Intel PT logger Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-08 08:00 +0200
Re: [PATCH v2 3/4] perf/x86/intel/pt: Add Intel PT logger Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-08 11:50 +0200
Re: [PATCH v2 3/4] perf/x86/intel/pt: Add Intel PT logger Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-09 04:50 +0200
Re: [PATCH v2 3/4] perf/x86/intel/pt: Add Intel PT logger Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-15 14:10 +0200
[PATCH v2 4/4] x86: Stop Intel PT and save its registers when panic occurs Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-08 08:00 +0200
[PATCH v2 2/4] perf: Add function to enable perf events in kernel with ring buffer Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-08 08:00 +0200
Re: [PATCH v2 2/4] perf: Add function to enable perf events in kernel with ring buffer Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-08 11:40 +0200
Re: [PATCH v2 2/4] perf: Add function to enable perf events in kernel with ring buffer Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-09 04:20 +0200
Re: [PATCH v2 2/4] perf: Add function to enable perf events in kernel with ring buffer Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-15 14:10 +0200
[PATCH v2 1/4] perf/trace: Add function to find event type by name Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-09-08 08:00 +0200
csiph-web