linux_old1/Documentation/powerpc
Michael Neuling c1fe190c06 powerpc: Add force enable of DAWR on P9 option
This adds a flag so that the DAWR can be enabled on P9 via:
  echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous

The DAWR was previously force disabled on POWER9 in:
  9654153158 powerpc: Disable DAWR in the base POWER9 CPU features
Also see Documentation/powerpc/DAWR-POWER9.txt

This is a dangerous setting, USE AT YOUR OWN RISK.

Some users may not care about a bad user crashing their box
(ie. single user/desktop systems) and really want the DAWR.  This
allows them to force enable DAWR.

This flag can also be used to disable DAWR access. Once this is
cleared, all DAWR access should be cleared immediately and your
machine once again safe from crashing.

Userspace may get confused by toggling this. If DAWR is force
enabled/disabled between getting the number of breakpoints (via
PTRACE_GETHWDBGINFO) and setting the breakpoint, userspace will get an
inconsistent view of what's available. Similarly for guests.

For the DAWR to be enabled in a KVM guest, the DAWR needs to be force
enabled in the host AND the guest. For this reason, this won't work on
POWERVM as it doesn't allow the HCALL to work. Writes of 'Y' to the
dawr_enable_dangerous file will fail if the hypervisor doesn't support
writing the DAWR.

To double check the DAWR is working, run this kernel selftest:
  tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
Any errors/failures/skips mean something is wrong.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-04-20 22:20:45 +10:00
..
DAWR-POWER9.txt powerpc: Add force enable of DAWR on P9 option 2019-04-20 22:20:45 +10:00
bootwrapper.txt
cpu_families.txt powerpc: Add cpu family documentation 2014-06-05 13:20:01 +10:00
cpu_features.txt
cxl.txt cxl: Add psl9 specific code 2017-04-13 23:34:31 +10:00
cxlflash.txt scsi: cxlflash: Support AFU debug 2017-06-26 15:01:12 -04:00
dscr.txt Doc: powerpc: Fix typos in Documentation/powerpc 2015-07-10 14:00:51 -06:00
eeh-pci-error-recovery.txt powerpc/eeh: rename EEH from "extended" to "enhanced" error handling 2016-04-11 20:30:42 +10:00
firmware-assisted-dump.txt powerpc/fadump: Reservationless firmware assisted dump 2018-12-21 11:32:49 +11:00
hvcs.txt
isa-versions.rst powerpc: Add some documentation of ISA versions 2018-12-20 22:21:20 +11:00
mpc52xx.txt
pci_iov_resource_on_powernv.txt powerpc/pci: Add PCI resource alignment documentation 2015-03-31 13:02:38 +11:00
pmu-ebb.txt powerpc/perf: Core EBB support for 64-bit book3s 2013-07-01 11:50:10 +10:00
ptrace.txt
qe_firmware.txt Doc: powerpc: Fix typos in Documentation/powerpc 2015-07-10 14:00:51 -06:00
syscall64-abi.txt powerpc/64: Document the syscall ABI 2016-09-20 14:36:14 +10:00
transactional_memory.txt powerpc: Document issues with TM on POWER9 2018-07-02 23:54:29 +10:00