DAWR-POWER9.txt 2.1 KB

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