linux_dsm_epyc7002/arch/xtensa/kernel
Max Filippov c91e02bd97 xtensa: support hardware breakpoints/watchpoints
Use perf framework to manage hardware instruction and data breakpoints.
Add two new ptrace calls: PTRACE_GETHBPREGS and PTRACE_SETHBPREGS to
query and set instruction and data breakpoints.
Address bit 0 choose instruction (0) or data (1) break register, bits
31..1 are the register number.
Both calls transfer two 32-bit words: address (0) and control (1).
Instruction breakpoint contorl word is 0 to clear breakpoint, 1 to set.
Data breakpoint control word bit 31 is 'trigger on store', bit 30 is
'trigger on load, bits 29..0 are length. Length 0 is used to clear a
breakpoint. To set a breakpoint length must be a power of 2 in the range
1..64 and the address must be length-aligned.

Introduce new thread_info flag: TIF_DB_DISABLED. Set it if debug
exception is raised by the kernel code accessing watched userspace
address and disable corresponding data breakpoint. On exit to userspace
check that flag and, if set, restore all data breakpoints.

Handle debug exceptions raised with PS.EXCM set. This may happen when
window overflow/underflow handler or fast exception handler hits data
breakpoint, in which case save and disable all data breakpoints,
single-step faulting instruction and restore data breakpoints.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11 08:53:32 +00:00
..
.gitignore xtensa: tell git to ignore generated files 2013-06-05 10:14:19 -07:00
align.S xtensa: allow single-stepping through unaligned load/store 2014-08-14 11:59:30 +04:00
asm-offsets.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
coprocessor.S xtensa: keep a3 and excsave1 on entry to exception handlers 2013-09-06 09:47:41 -07:00
entry.S xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
head.S xtensa: use context structure for debug exceptions 2016-03-11 08:53:32 +00:00
hw_breakpoint.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
irq.c Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:33:35 -07:00
Makefile xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
mcount.S xtensa: add static function tracer support 2013-07-08 01:18:57 -07:00
module.c xtensa: clean up files to make them code-style compliant 2012-12-18 21:10:25 -08:00
mxhead.S xtensa: drop unused sections and remapped reset handlers 2015-11-03 17:19:39 +03:00
pci-dma.c xtensa: support DMA to high memory 2015-11-09 01:25:37 +03:00
pci.c PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
perf_event.c xtensa: implement fake NMI 2015-08-17 07:33:39 +03:00
platform.c xtensa: cleanup ccount frequency tracking 2013-07-08 01:11:37 -07:00
process.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
ptrace.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
setup.c xtensa: fix secondary core boot in SMP 2015-11-03 17:19:38 +03:00
signal.c Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
smp.c flush_icache_range: export symbol to fix build errors 2014-08-29 16:28:17 -07:00
stacktrace.c xtensa: move oprofile stack tracing to stacktrace.c 2015-08-17 07:32:49 +03:00
syscall.c xtensa: nommu: don't provide arch_get_unmapped_area 2014-10-21 13:28:48 +04:00
time.c clocksource: cosmetic: Drop OF 'dependency' from symbols 2015-10-01 02:18:39 +02:00
traps.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
vectors.S xtensa: use context structure for debug exceptions 2016-03-11 08:53:32 +00:00
vmlinux.lds.S xtensa: drop unused sections and remapped reset handlers 2015-11-03 17:19:39 +03:00
xtensa_ksyms.c xtensa: export __{invalidate,flush}_dcache_range 2014-04-02 01:35:50 +04:00