diff mbox series

[1/2] powerpc: Document issues with the DAWR on POWER9

Message ID 20180622061452.19016-1-mikey@neuling.org (mailing list archive)
State Superseded
Headers show
Series [1/2] powerpc: Document issues with the DAWR on POWER9 | expand

Commit Message

Michael Neuling June 22, 2018, 6:14 a.m. UTC
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 Documentation/powerpc/DAWR-POWER9.txt | 58 +++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/powerpc/DAWR-POWER9.txt

Comments

Stewart Smith June 22, 2018, 7 a.m. UTC | #1
Michael Neuling <mikey@neuling.org> writes:
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  Documentation/powerpc/DAWR-POWER9.txt | 58 +++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 Documentation/powerpc/DAWR-POWER9.txt

Acked-by: Stewart Smith <stewart@linux.ibm.com>
Segher Boessenkool June 22, 2018, 5:23 p.m. UTC | #2
On Fri, Jun 22, 2018 at 04:14:51PM +1000, Michael Neuling wrote:
> +will accept the command. Unfortunatley since there is no hardware

"unfortunately".

> +speed since it can use the hardware emualation. Unfortnatley if this

It is not your favourite word to type ;-)


Segher
Michael Neuling June 25, 2018, 1:30 a.m. UTC | #3
On Fri, 2018-06-22 at 12:23 -0500, Segher Boessenkool wrote:
> On Fri, Jun 22, 2018 at 04:14:51PM +1000, Michael Neuling wrote:
> > +will accept the command. Unfortunatley since there is no hardware
> 
> "unfortunately".
> 
> > +speed since it can use the hardware emualation. Unfortnatley if this
> 
> It is not your favourite word to type ;-)

Or emulation apparently :-/

Thanks.
Mikey
diff mbox series

Patch

diff --git a/Documentation/powerpc/DAWR-POWER9.txt b/Documentation/powerpc/DAWR-POWER9.txt
new file mode 100644
index 0000000000..cc6e69b69b
--- /dev/null
+++ b/Documentation/powerpc/DAWR-POWER9.txt
@@ -0,0 +1,58 @@ 
+DAWR issues on POWER9
+============================
+
+On POWER9 the DAWR can cause a checkstop if it points to cache
+inhibited (CI) memory. Currently Linux has no way to disinguish CI
+memory when configuring the DAWR, so (for now) the DAWR is disabled by
+this commit:
+
+    commit 9654153158d3e0684a1bdb76dbababdb7111d5a0
+    Author: Michael Neuling <mikey@neuling.org>
+    Date:   Tue Mar 27 15:37:24 2018 +1100
+    powerpc: Disable DAWR in the base POWER9 CPU features
+
+Technical Details:
+============================
+
+DAWR has 6 different ways of being set.
+1) ptrace
+2) h_set_mode(DAWR)
+3) h_set_dabr()
+4) kvmppc_set_one_reg()
+5) xmon
+
+For ptrace, we now advertise zero breakpoints on POWER9 via the
+PPC_PTRACE_GETHWDBGINFO call. This results in GDB falling back to
+software emulation of the watchpoint (which is slow).
+
+h_set_mode(DAWR) and h_set_dabr() will now return an error to the
+guest on a POWER9 host. Current Linux guests ignore this error, so
+they will silently not get the DAWR.
+
+kvmppc_set_one_reg() will store the value in the vcpu but won't
+actually set it on POWER9 hardware. This is done so we don't break
+migration from POWER8 to POWER9, at the cost of silently losing the
+DAWR on the migration.
+
+For xmon, the 'bd' command will return an error on P9.
+
+Consequences for users
+============================
+
+For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB
+will accept the command. Unfortunatley since there is no hardware
+support for the watchpoint, GDB will software emulate the watchpoint
+making it run very slowly.
+
+The same will also be true for any guests started on a POWER9
+host. The watchpoint will fail and GDB will fall back to software
+emulation.
+
+If a guest is started on a POWER8 host, GDB will accept the watchpoint
+and configure the hardware to use the DAWR. This will run at full
+speed since it can use the hardware emualation. Unfortnatley if this
+guest is migrated to a POWER9 host, the watchpoint will be lost on the
+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.
+