aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2019-04-30 22:52:03 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2019-04-30 22:52:03 +1000
commitbdc7c970bcdce1c018957e0158230bc025682ba2 (patch)
tree8ccb80ea00653b2a218b401bf0728a80a1ddaaa7 /Documentation
parentpowerpc/watchdog: Use hrtimers for per-CPU heartbeat (diff)
parentpowerpc/powernv/idle: Restore AMR/UAMOR/AMOR/IAMR after idle (diff)
downloadlinux-dev-bdc7c970bcdce1c018957e0158230bc025682ba2.tar.xz
linux-dev-bdc7c970bcdce1c018957e0158230bc025682ba2.zip
Merge branch 'topic/ppc-kvm' into next
Merge our topic branch shared with KVM. In particular this includes the rewrite of the idle code into C.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/powerpc/DAWR-POWER9.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/powerpc/DAWR-POWER9.txt b/Documentation/powerpc/DAWR-POWER9.txt
index 2feaa6619658..bdec03650941 100644
--- a/Documentation/powerpc/DAWR-POWER9.txt
+++ b/Documentation/powerpc/DAWR-POWER9.txt
@@ -56,3 +56,35 @@ POWER9. Loads and stores to the watchpoint locations will not be
trapped in GDB. The watchpoint is remembered, so if the guest is
migrated back to the POWER8 host, it will start working again.
+Force enabling the DAWR
+=============================
+Kernels (since ~v5.2) have an option to force enable the DAWR via:
+
+ echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous
+
+This enables the DAWR even on POWER9.
+
+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.