GNU Linux-libre 4.19.286-gnu1
[releases.git] / Documentation / powerpc / DAWR-POWER9.txt
1 DAWR issues on POWER9
2 ============================
3
4 On POWER9 the DAWR can cause a checkstop if it points to cache
5 inhibited (CI) memory. Currently Linux has no way to disinguish CI
6 memory when configuring the DAWR, so (for now) the DAWR is disabled by
7 this commit:
8
9     commit 9654153158d3e0684a1bdb76dbababdb7111d5a0
10     Author: Michael Neuling <mikey@neuling.org>
11     Date:   Tue Mar 27 15:37:24 2018 +1100
12     powerpc: Disable DAWR in the base POWER9 CPU features
13
14 Technical Details:
15 ============================
16
17 DAWR has 6 different ways of being set.
18 1) ptrace
19 2) h_set_mode(DAWR)
20 3) h_set_dabr()
21 4) kvmppc_set_one_reg()
22 5) xmon
23
24 For ptrace, we now advertise zero breakpoints on POWER9 via the
25 PPC_PTRACE_GETHWDBGINFO call. This results in GDB falling back to
26 software emulation of the watchpoint (which is slow).
27
28 h_set_mode(DAWR) and h_set_dabr() will now return an error to the
29 guest on a POWER9 host. Current Linux guests ignore this error, so
30 they will silently not get the DAWR.
31
32 kvmppc_set_one_reg() will store the value in the vcpu but won't
33 actually set it on POWER9 hardware. This is done so we don't break
34 migration from POWER8 to POWER9, at the cost of silently losing the
35 DAWR on the migration.
36
37 For xmon, the 'bd' command will return an error on P9.
38
39 Consequences for users
40 ============================
41
42 For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB
43 will accept the command. Unfortunately since there is no hardware
44 support for the watchpoint, GDB will software emulate the watchpoint
45 making it run very slowly.
46
47 The same will also be true for any guests started on a POWER9
48 host. The watchpoint will fail and GDB will fall back to software
49 emulation.
50
51 If a guest is started on a POWER8 host, GDB will accept the watchpoint
52 and configure the hardware to use the DAWR. This will run at full
53 speed since it can use the hardware emulation. Unfortunately if this
54 guest is migrated to a POWER9 host, the watchpoint will be lost on the
55 POWER9. Loads and stores to the watchpoint locations will not be
56 trapped in GDB. The watchpoint is remembered, so if the guest is
57 migrated back to the POWER8 host, it will start working again.
58