All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] powerpc: Disable DAWR on POWER9
@ 2018-03-27  4:37 ` Michael Neuling
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Neuling @ 2018-03-27  4:37 UTC (permalink / raw)
  To: mpe
  Cc: linuxppc-dev, paulus, david, npiggin, pedromfc, kvm-ppc,
	Ananth N Mavinakayanahalli

Using the DAWR on POWER9 can cause xstops, hence we need to disable
it.

The current CPU_FTR for DAWR is a bit messy. Despite having
CPU_FTR_DAWR, currently we assume DAWR exists in the KVM code based on
CPU_FTR_ARCH_207. In other places we assume DAWR exists if
CPU_FTR_DAWR is set.

This attempts to clear up the situation by always using CPU_FTR_DAWR
before setting the DAWR (to a non-zero value).

DAWR has 5 different ways of being set from userspace. ptrace,
h_set_mode, h_set_mode(DAWR), h_set_dabr(), kvmppc_set_one_reg() and
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() and h_set_dabr() will now return an error to the guest
when on a POWER9 host. Current Linux guests ignore this error, so they
will silently not get the DAWR (sigh). The same error codes are being
used by POWERVM in this case.

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 P8 to P9, at the cost of silently losing the DAWR on
the migration. This is not ideal but hopefully the best overall
solution. This approach has been acked by paulus.

For xmon, the 'bd' command will return an error on P9.

Thanks to Pedro Franco de Carvalho for the initial version of this.

v3:
  Split patches
  Fix usage of H_UNSUPPORTED

v2:
  Move to CPU feature quirk from Nick's
  dbginfo.num_data_bps = 0 if !breakpoint_available() from Pedro

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-03-28 14:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27  4:37 [PATCH v3 0/8] powerpc: Disable DAWR on POWER9 Michael Neuling
2018-03-27  4:37 ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 1/8] powerpc: Add ppc_breakpoint_available() Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-28 14:13   ` [v3,1/8] " Michael Ellerman
2018-03-28 14:13     ` Michael Ellerman
2018-03-27  4:37 ` [PATCH v3 2/8] powerpc: Update ptrace to use ppc_breakpoint_available() Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 3/8] powerpc: Update xmon " Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 4/8] KVM: PPC: Book3S HV: Return error from h_set_mode(SET_DAWR) on POWER9 Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 5/8] KVM: PPC: Book3S HV: Return error from h_set_dabr() " Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 6/8] KVM: PPC: Book3S HV: Handle migration with POWER9 disabled DAWR Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 7/8] powerpc: Disable DAWR on POWER9 via CPU feature quirk Michael Neuling
2018-03-27  4:37   ` Michael Neuling
2018-03-27  4:37 ` [PATCH v3 8/8] powerpc: Disable DAWR in the base POWER9 CPU features Michael Neuling
2018-03-27  4:37   ` Michael Neuling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.